<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>spade.tbcbp</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="spade-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://spade2.googlecode.com">SPADE</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="spade-module.html">Package&nbsp;spade</a> ::
        Module&nbsp;tbcbp
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="spade.tbcbp-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="spade.tbcbp-module.html">Module spade.tbcbp</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">Queue</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">time</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">random</tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Module spade.odict=spade.odict-module.html,Class spade.odict.odict=spade.odict.odict-class.html"><a title="spade.odict
spade.odict.odict" class="py-name" href="#" onclick="return doclink('link-0', 'odict', 'link-0');">odict</a></tt> <tt class="py-keyword">import</tt> <tt id="link-1" class="py-name"><a title="spade.odict
spade.odict.odict" class="py-name" href="#" onclick="return doclink('link-1', 'odict', 'link-0');">odict</a></tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-2" class="py-name" targets="Method spade.odict.odict.copy()=spade.odict.odict-class.html#copy,Method spade.pyparsing.Keyword.copy()=spade.pyparsing.Keyword-class.html#copy,Method spade.pyparsing.ParseResults.copy()=spade.pyparsing.ParseResults-class.html#copy,Method spade.pyparsing.ParserElement.copy()=spade.pyparsing.ParserElement-class.html#copy"><a title="spade.odict.odict.copy
spade.pyparsing.Keyword.copy
spade.pyparsing.ParseResults.copy
spade.pyparsing.ParserElement.copy" class="py-name" href="#" onclick="return doclink('link-2', 'copy', 'link-2');">copy</a></tt> <tt class="py-keyword">import</tt> <tt id="link-3" class="py-name"><a title="spade.odict.odict.copy
spade.pyparsing.Keyword.copy
spade.pyparsing.ParseResults.copy
spade.pyparsing.ParserElement.copy" class="py-name" href="#" onclick="return doclink('link-3', 'copy', 'link-2');">copy</a></tt><tt class="py-op">,</tt> <tt class="py-name">deepcopy</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">uuid</tt> <tt class="py-keyword">import</tt> <tt class="py-name">uuid4</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">math</tt> <tt class="py-keyword">import</tt> <tt class="py-name">sqrt</tt><tt class="py-op">,</tt> <tt class="py-name">pow</tt><tt class="py-op">,</tt> <tt class="py-name">ceil</tt><tt class="py-op">,</tt> <tt class="py-name">log</tt><tt class="py-op">,</tt> <tt class="py-name">floor</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">math</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-4" class="py-name" targets="Variable spade.bdi.Goal.types=spade.bdi.Goal-class.html#types"><a title="spade.bdi.Goal.types" class="py-name" href="#" onclick="return doclink('link-4', 'types', 'link-4');">types</a></tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-5" class="py-name" targets="Module spade.dblite=spade.dblite-module.html"><a title="spade.dblite" class="py-name" href="#" onclick="return doclink('link-5', 'dblite', 'link-5');">dblite</a></tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"> </tt>
<a name="TimeOut"></a><div id="TimeOut-def"><a name="L13"></a><tt class="py-lineno"> 13</tt> <a class="py-toggle" href="#" id="TimeOut-toggle" onclick="return toggle('TimeOut');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="spade.tbcbp.TimeOut-class.html">TimeOut</a><tt class="py-op">(</tt><tt class="py-base-class">Exception</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">pass</tt> </tt>
</div><a name="TooMuchPlans"></a><div id="TooMuchPlans-def"><a name="L14"></a><tt class="py-lineno"> 14</tt> <a class="py-toggle" href="#" id="TooMuchPlans-toggle" onclick="return toggle('TooMuchPlans');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="spade.tbcbp.TooMuchPlans-class.html">TooMuchPlans</a><tt class="py-op">(</tt><tt class="py-base-class">Exception</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">pass</tt> </tt>
</div><a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"> </tt>
<a name="CaseDB"></a><div id="CaseDB-def"><a name="L16"></a><tt class="py-lineno"> 16</tt> <a class="py-toggle" href="#" id="CaseDB-toggle" onclick="return toggle('CaseDB');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="spade.tbcbp.CaseDB-class.html">CaseDB</a><tt class="py-op">:</tt> </tt>
</div><div id="CaseDB-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="CaseDB-expanded"><a name="CaseDB.__init__"></a><div id="CaseDB.__init__-def"><a name="L17"></a><tt class="py-lineno"> 17</tt> <a class="py-toggle" href="#" id="CaseDB.__init__-toggle" onclick="return toggle('CaseDB.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.CaseDB-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CaseDB.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="CaseDB.__init__-expanded"><a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Variable spade.xmppd.modules.db_fake.DB.db=spade.xmppd.modules.db_fake.DB-class.html#db,Variable spade.xmppd.modules.db_fake.db=spade.xmppd.modules.db_fake-module.html#db"><a title="spade.xmppd.modules.db_fake.DB.db
spade.xmppd.modules.db_fake.db" class="py-name" href="#" onclick="return doclink('link-6', 'db', 'link-6');">db</a></tt> <tt class="py-op">=</tt> <tt id="link-7" class="py-name"><a title="spade.dblite" class="py-name" href="#" onclick="return doclink('link-7', 'dblite', 'link-5');">dblite</a></tt><tt class="py-op">.</tt><tt id="link-8" class="py-name" targets="Class spade.dblite.Base=spade.dblite.Base-class.html"><a title="spade.dblite.Base" class="py-name" href="#" onclick="return doclink('link-8', 'Base', 'link-8');">Base</a></tt><tt class="py-op">(</tt><tt class="py-string">"caseDB"</tt><tt class="py-op">)</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name"><a title="spade.xmppd.modules.db_fake.DB.db
spade.xmppd.modules.db_fake.db" class="py-name" href="#" onclick="return doclink('link-9', 'db', 'link-6');">db</a></tt><tt class="py-op">.</tt><tt id="link-10" class="py-name" targets="Method spade.dblite.Base.create()=spade.dblite.Base-class.html#create"><a title="spade.dblite.Base.create" class="py-name" href="#" onclick="return doclink('link-10', 'create', 'link-10');">create</a></tt><tt class="py-op">(</tt><tt class="py-string">"P"</tt><tt class="py-op">,</tt><tt class="py-string">"Q"</tt><tt class="py-op">,</tt><tt class="py-string">"inputs"</tt><tt class="py-op">,</tt><tt class="py-string">"outputs"</tt><tt class="py-op">,</tt><tt class="py-string">"case"</tt><tt class="py-op">,</tt> <tt class="py-name">mode</tt><tt class="py-op">=</tt><tt class="py-string">"override"</tt><tt class="py-op">)</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name"><a title="spade.xmppd.modules.db_fake.DB.db
spade.xmppd.modules.db_fake.db" class="py-name" href="#" onclick="return doclink('link-11', 'db', 'link-6');">db</a></tt><tt class="py-op">.</tt><tt id="link-12" class="py-name" targets="Method spade.dblite.Base.open()=spade.dblite.Base-class.html#open"><a title="spade.dblite.Base.open" class="py-name" href="#" onclick="return doclink('link-12', 'open', 'link-12');">open</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"> </tt>
<a name="CaseDB.add"></a><div id="CaseDB.add-def"><a name="L22"></a><tt class="py-lineno"> 22</tt> <a class="py-toggle" href="#" id="CaseDB.add-toggle" onclick="return toggle('CaseDB.add');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.CaseDB-class.html#add">add</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">case</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CaseDB.add-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="CaseDB.add-expanded"><a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line">        <tt id="link-13" class="py-name" targets="Variable spade.Agent.P=spade.Agent-module.html#P,Variable spade.bdi.P=spade.bdi-module.html#P,Variable spade.logic.P=spade.logic-module.html#P"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-13', 'P', 'link-13');">P</a></tt> <tt class="py-op">=</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">case</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name" targets="Method spade.DF.Service.getP()=spade.DF.Service-class.html#getP,Method spade.tbcbp.Case.getP()=spade.tbcbp.Case-class.html#getP,Method spade.tbcbp.Plan.getP()=spade.tbcbp.Plan-class.html#getP"><a title="spade.DF.Service.getP
spade.tbcbp.Case.getP
spade.tbcbp.Plan.getP" class="py-name" href="#" onclick="return doclink('link-14', 'getP', 'link-14');">getP</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line">        <tt id="link-15" class="py-name" targets="Variable spade.Agent.Q=spade.Agent-module.html#Q,Variable spade.bdi.Q=spade.bdi-module.html#Q,Variable spade.logic.Q=spade.logic-module.html#Q"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-15', 'Q', 'link-15');">Q</a></tt> <tt class="py-op">=</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">case</tt><tt class="py-op">.</tt><tt id="link-16" class="py-name" targets="Method spade.DF.Service.getQ()=spade.DF.Service-class.html#getQ,Method spade.tbcbp.Case.getQ()=spade.tbcbp.Case-class.html#getQ,Method spade.tbcbp.Plan.getQ()=spade.tbcbp.Plan-class.html#getQ"><a title="spade.DF.Service.getQ
spade.tbcbp.Case.getQ
spade.tbcbp.Plan.getQ" class="py-name" href="#" onclick="return doclink('link-16', 'getQ', 'link-16');">getQ</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line">        <tt class="py-name">I</tt> <tt class="py-op">=</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">case</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name" targets="Method spade.DF.Service.getInputs()=spade.DF.Service-class.html#getInputs,Method spade.tbcbp.Case.getInputs()=spade.tbcbp.Case-class.html#getInputs,Method spade.tbcbp.Plan.getInputs()=spade.tbcbp.Plan-class.html#getInputs"><a title="spade.DF.Service.getInputs
spade.tbcbp.Case.getInputs
spade.tbcbp.Plan.getInputs" class="py-name" href="#" onclick="return doclink('link-17', 'getInputs', 'link-17');">getInputs</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line">        <tt class="py-name">O</tt> <tt class="py-op">=</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">case</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name" targets="Method spade.DF.Service.getOutputs()=spade.DF.Service-class.html#getOutputs,Method spade.tbcbp.Case.getOutputs()=spade.tbcbp.Case-class.html#getOutputs,Method spade.tbcbp.Plan.getOutputs()=spade.tbcbp.Plan-class.html#getOutputs"><a title="spade.DF.Service.getOutputs
spade.tbcbp.Case.getOutputs
spade.tbcbp.Plan.getOutputs" class="py-name" href="#" onclick="return doclink('link-18', 'getOutputs', 'link-18');">getOutputs</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name"><a title="spade.xmppd.modules.db_fake.DB.db
spade.xmppd.modules.db_fake.db" class="py-name" href="#" onclick="return doclink('link-19', 'db', 'link-6');">db</a></tt><tt class="py-op">.</tt><tt id="link-20" class="py-name" targets="Method spade.dblite.Base.insert()=spade.dblite.Base-class.html#insert"><a title="spade.dblite.Base.insert" class="py-name" href="#" onclick="return doclink('link-20', 'insert', 'link-20');">insert</a></tt><tt class="py-op">(</tt><tt id="link-21" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-21', 'P', 'link-13');">P</a></tt><tt class="py-op">=</tt><tt id="link-22" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-22', 'P', 'link-13');">P</a></tt><tt class="py-op">,</tt><tt id="link-23" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-23', 'Q', 'link-15');">Q</a></tt><tt class="py-op">=</tt><tt id="link-24" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-24', 'Q', 'link-15');">Q</a></tt><tt class="py-op">,</tt><tt class="py-name">inputs</tt><tt class="py-op">=</tt><tt class="py-name">I</tt><tt class="py-op">,</tt><tt class="py-name">outputs</tt><tt class="py-op">=</tt><tt class="py-name">O</tt><tt class="py-op">,</tt><tt class="py-name">case</tt><tt class="py-op">=</tt><tt class="py-name">case</tt><tt class="py-op">)</tt> </tt>
</div><a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"> </tt>
<a name="CaseDB.get"></a><div id="CaseDB.get-def"><a name="L30"></a><tt class="py-lineno"> 30</tt> <a class="py-toggle" href="#" id="CaseDB.get-toggle" onclick="return toggle('CaseDB.get');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.CaseDB-class.html#get">get</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">P</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt><tt class="py-param">Q</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt><tt class="py-param">inputs</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt><tt class="py-param">outputs</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CaseDB.get-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="CaseDB.get-expanded"><a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line">        <tt class="py-name">res</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line">        <tt id="link-25" class="py-name" targets="Method spade.pyxf.eclipse.query()=spade.pyxf.eclipse-class.html#query,Method spade.pyxf.flora2.query()=spade.pyxf.flora2-class.html#query,Method spade.pyxf.swipl.query()=spade.pyxf.swipl-class.html#query,Method spade.pyxf.xsb.query()=spade.pyxf.xsb-class.html#query"><a title="spade.pyxf.eclipse.query
spade.pyxf.flora2.query
spade.pyxf.swipl.query
spade.pyxf.xsb.query" class="py-name" href="#" onclick="return doclink('link-25', 'query', 'link-25');">query</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"self.db("</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-26" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-26', 'P', 'link-13');">P</a></tt><tt class="py-op">!=</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> <tt id="link-27" class="py-name"><a title="spade.pyxf.eclipse.query
spade.pyxf.flora2.query
spade.pyxf.swipl.query
spade.pyxf.xsb.query" class="py-name" href="#" onclick="return doclink('link-27', 'query', 'link-25');">query</a></tt><tt class="py-op">+=</tt><tt class="py-string">"P="</tt><tt class="py-op">+</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt id="link-28" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-28', 'P', 'link-13');">P</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-string">","</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-29" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-29', 'Q', 'link-15');">Q</a></tt><tt class="py-op">!=</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> <tt id="link-30" class="py-name"><a title="spade.pyxf.eclipse.query
spade.pyxf.flora2.query
spade.pyxf.swipl.query
spade.pyxf.xsb.query" class="py-name" href="#" onclick="return doclink('link-30', 'query', 'link-25');">query</a></tt><tt class="py-op">+=</tt><tt class="py-string">"Q="</tt><tt class="py-op">+</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt id="link-31" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-31', 'Q', 'link-15');">Q</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-string">","</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">inputs</tt><tt class="py-op">!=</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> <tt id="link-32" class="py-name"><a title="spade.pyxf.eclipse.query
spade.pyxf.flora2.query
spade.pyxf.swipl.query
spade.pyxf.xsb.query" class="py-name" href="#" onclick="return doclink('link-32', 'query', 'link-25');">query</a></tt><tt class="py-op">+=</tt><tt class="py-string">"inputs="</tt><tt class="py-op">+</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">inputs</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-string">","</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">outputs</tt><tt class="py-op">!=</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> <tt id="link-33" class="py-name"><a title="spade.pyxf.eclipse.query
spade.pyxf.flora2.query
spade.pyxf.swipl.query
spade.pyxf.xsb.query" class="py-name" href="#" onclick="return doclink('link-33', 'query', 'link-25');">query</a></tt><tt class="py-op">+=</tt><tt class="py-string">"outputs="</tt><tt class="py-op">+</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">outputs</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">        <tt id="link-34" class="py-name"><a title="spade.pyxf.eclipse.query
spade.pyxf.flora2.query
spade.pyxf.swipl.query
spade.pyxf.xsb.query" class="py-name" href="#" onclick="return doclink('link-34', 'query', 'link-25');">query</a></tt><tt class="py-op">+=</tt><tt class="py-string">")"</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">record</tt> <tt class="py-keyword">in</tt> <tt id="link-35" class="py-name" targets="Method spade.pyratemp.PseudoSandbox.eval()=spade.pyratemp.PseudoSandbox-class.html#eval"><a title="spade.pyratemp.PseudoSandbox.eval" class="py-name" href="#" onclick="return doclink('link-35', 'eval', 'link-35');">eval</a></tt><tt class="py-op">(</tt><tt id="link-36" class="py-name"><a title="spade.pyxf.eclipse.query
spade.pyxf.flora2.query
spade.pyxf.swipl.query
spade.pyxf.xsb.query" class="py-name" href="#" onclick="return doclink('link-36', 'query', 'link-25');">query</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">            <tt class="py-name">res</tt><tt class="py-op">.</tt><tt id="link-37" class="py-name" targets="Method spade.pyparsing.ParseExpression.append()=spade.pyparsing.ParseExpression-class.html#append"><a title="spade.pyparsing.ParseExpression.append" class="py-name" href="#" onclick="return doclink('link-37', 'append', 'link-37');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">record</tt><tt class="py-op">[</tt><tt class="py-string">"case"</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line"> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">res</tt> </tt>
</div></div><a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line"> </tt>
<a name="Case"></a><div id="Case-def"><a name="L43"></a><tt class="py-lineno"> 43</tt> <a class="py-toggle" href="#" id="Case-toggle" onclick="return toggle('Case');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="spade.tbcbp.Case-class.html">Case</a><tt class="py-op">(</tt><tt class="py-base-class">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Case-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Case-expanded"><a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">     </tt>
<a name="Case.__init__"></a><div id="Case.__init__-def"><a name="L45"></a><tt class="py-lineno"> 45</tt> <a class="py-toggle" href="#" id="Case.__init__-toggle" onclick="return toggle('Case.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Case-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">P</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-param">Q</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-param">inputs</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-param">outputs</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-param">services</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-param">QoS</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-param">ID</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Case.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Case.__init__-expanded"><a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">        <tt class="py-name">dict</tt><tt class="py-op">.</tt><tt id="link-38" class="py-name" targets="Method spade.ACLMessage.ACLMessage.__init__()=spade.ACLMessage.ACLMessage-class.html#__init__,Method spade.ACLParser.ACLParser.__init__()=spade.ACLParser.ACLParser-class.html#__init__,Method spade.ACLParser.ACLxmlParser.__init__()=spade.ACLParser.ACLxmlParser-class.html#__init__,Method spade.AID.aid.__init__()=spade.AID.aid-class.html#__init__,Method spade.AMS.AMS.DefaultBehaviour.__init__()=spade.AMS.AMS.DefaultBehaviour-class.html#__init__,Method spade.AMS.AMS.ModifyBehaviour.__init__()=spade.AMS.AMS.ModifyBehaviour-class.html#__init__,Method spade.AMS.AMS.PlatformBehaviour.__init__()=spade.AMS.AMS.PlatformBehaviour-class.html#__init__,Method spade.AMS.AMS.RegisterBehaviour.__init__()=spade.AMS.AMS.RegisterBehaviour-class.html#__init__,Method spade.AMS.AMS.SearchBehaviour.__init__()=spade.AMS.AMS.SearchBehaviour-class.html#__init__,Method spade.AMS.AMS.__init__()=spade.AMS.AMS-class.html#__init__,Method spade.AMS.AmsAgentDescription.__init__()=spade.AMS.AmsAgentDescription-class.html#__init__,Method spade.Agent.AbstractAgent.__init__()=spade.Agent.AbstractAgent-class.html#__init__,Method spade.Agent.Agent.__init__()=spade.Agent.Agent-class.html#__init__,Method spade.Agent.PlatformAgent.__init__()=spade.Agent.PlatformAgent-class.html#__init__,Method spade.Agent.jabberProcess.__init__()=spade.Agent.jabberProcess-class.html#__init__,Method spade.BasicFipaDateTime.BasicFipaDateTime.__init__()=spade.BasicFipaDateTime.BasicFipaDateTime-class.html#__init__,Method spade.Behaviour.ACLTemplate.__init__()=spade.Behaviour.ACLTemplate-class.html#__init__,Method spade.Behaviour.ANDTemplate.__init__()=spade.Behaviour.ANDTemplate-class.html#__init__,Method spade.Behaviour.Behaviour.__init__()=spade.Behaviour.Behaviour-class.html#__init__,Method spade.Behaviour.BehaviourTemplate.__init__()=spade.Behaviour.BehaviourTemplate-class.html#__init__,Method spade.Behaviour.EventBehaviour.__init__()=spade.Behaviour.EventBehaviour-class.html#__init__,Method spade.Behaviour.FSMBehaviour.__init__()=spade.Behaviour.FSMBehaviour-class.html#__init__,Method spade.Behaviour.MessageTemplate.__init__()=spade.Behaviour.MessageTemplate-class.html#__init__,Method spade.Behaviour.NOTTemplate.__init__()=spade.Behaviour.NOTTemplate-class.html#__init__,Method spade.Behaviour.ORTemplate.__init__()=spade.Behaviour.ORTemplate-class.html#__init__,Method spade.Behaviour.OneShotBehaviour.__init__()=spade.Behaviour.OneShotBehaviour-class.html#__init__,Method spade.Behaviour.PeriodicBehaviour.__init__()=spade.Behaviour.PeriodicBehaviour-class.html#__init__,Method spade.Behaviour.TimeOutBehaviour.__init__()=spade.Behaviour.TimeOutBehaviour-class.html#__init__,Method spade.Behaviour.XORTemplate.__init__()=spade.Behaviour.XORTemplate-class.html#__init__,Method spade.DF.DF.DefaultBehaviour.__init__()=spade.DF.DF.DefaultBehaviour-class.html#__init__,Method spade.DF.DF.ModifyBehaviour.__init__()=spade.DF.DF.ModifyBehaviour-class.html#__init__,Method spade.DF.DF.RegisterBehaviour.__init__()=spade.DF.DF.RegisterBehaviour-class.html#__init__,Method spade.DF.DF.SearchBehaviour.__init__()=spade.DF.DF.SearchBehaviour-class.html#__init__,Method spade.DF.DF.__init__()=spade.DF.DF-class.html#__init__,Method spade.DF.DfAgentDescription.__init__()=spade.DF.DfAgentDescription-class.html#__init__,Method spade.DF.Service.__init__()=spade.DF.Service-class.html#__init__,Method spade.DF.ServiceDescription.__init__()=spade.DF.ServiceDescription-class.html#__init__,Method spade.ECLiPSeKB.ECLiPSeKB.__init__()=spade.ECLiPSeKB.ECLiPSeKB-class.html#__init__,Method spade.Envelope.Envelope.__init__()=spade.Envelope.Envelope-class.html#__init__,Method spade.FIPAMessage.FipaMessage.__init__()=spade.FIPAMessage.FipaMessage-class.html#__init__,Method spade.Flora2KB.Flora2KB.__init__()=spade.Flora2KB.Flora2KB-class.html#__init__,Method spade.MTP.MTP.__init__()=spade.MTP.MTP-class.html#__init__,Method spade.MessageReceiver.MessageReceiver.__init__()=spade.MessageReceiver.MessageReceiver-class.html#__init__,Method spade.Organization.BanedUser.__init__()=spade.Organization.BanedUser-class.html#__init__,Method spade.Organization.CreationError.__init__()=spade.Organization.CreationError-class.html#__init__,Method spade.Organization.DestroyError.__init__()=spade.Organization.DestroyError-class.html#__init__,Method spade.Organization.JoinError.__init__()=spade.Organization.JoinError-class.html#__init__,Method spade.Organization.LastOwner.__init__()=spade.Organization.LastOwner-class.html#__init__,Method spade.Organization.LockedOrganization.__init__()=spade.Organization.LockedOrganization-class.html#__init__,Method spade.Organization.MaximumUsers.__init__()=spade.Organization.MaximumUsers-class.html#__init__,Method spade.Organization.MemberOfFederation.__init__()=spade.Organization.MemberOfFederation-class.html#__init__,Method spade.Organization.MembersOnly.__init__()=spade.Organization.MembersOnly-class.html#__init__,Method spade.Organization.NickNameConflict.__init__()=spade.Organization.NickNameConflict-class.html#__init__,Method spade.Organization.NotOwner.__init__()=spade.Organization.NotOwner-class.html#__init__,Method spade.Organization.NotSupervisor.__init__()=spade.Organization.NotSupervisor-class.html#__init__,Method spade.Organization.NotValidGoal.__init__()=spade.Organization.NotValidGoal-class.html#__init__,Method spade.Organization.NotValidName.__init__()=spade.Organization.NotValidName-class.html#__init__,Method spade.Organization.NotValidType.__init__()=spade.Organization.NotValidType-class.html#__init__,Method spade.Organization.NotValidUnit.__init__()=spade.Organization.NotValidUnit-class.html#__init__,Method spade.Organization.Organization.CreateRoomBehaviour.__init__()=spade.Organization.Organization.CreateRoomBehaviour-class.html#__init__,Method spade.Organization.Organization.CreateTeamBehaviour.__init__()=spade.Organization.Organization.CreateTeamBehaviour-class.html#__init__,Method spade.Organization.Organization.DestroyBehaviour.__init__()=spade.Organization.Organization.DestroyBehaviour-class.html#__init__,Method spade.Organization.Organization.GetRegistrationFormBehaviour.__init__()=spade.Organization.Organization.GetRegistrationFormBehaviour-class.html#__init__,Method spade.Organization.Organization.GetUnitInfoBehaviour.__init__()=spade.Organization.Organization.GetUnitInfoBehaviour-class.html#__init__,Method spade.Organization.Organization.GetUnitListBehaviour.__init__()=spade.Organization.Organization.GetUnitListBehaviour-class.html#__init__,Method spade.Organization.Organization.IsMemberBehaviour.__init__()=spade.Organization.Organization.IsMemberBehaviour-class.html#__init__,Method spade.Organization.Organization.MyJoinRoomBehaviour.__init__()=spade.Organization.Organization.MyJoinRoomBehaviour-class.html#__init__,Method spade.Organization.Organization.SendRegistrationFormBehaviour.__init__()=spade.Organization.Organization.SendRegistrationFormBehaviour-class.html#__init__,Method spade.Organization.Organization.TestRoomNameBehaviour.__init__()=spade.Organization.Organization.TestRoomNameBehaviour-class.html#__init__,Method spade.Organization.Organization.__init__()=spade.Organization.Organization-class.html#__init__,Method spade.Organization.PaswordNeeded.__init__()=spade.Organization.PaswordNeeded-class.html#__init__,Method spade.Organization.Unavailable.__init__()=spade.Organization.Unavailable-class.html#__init__,Method spade.Organization.UnavailableFunction.__init__()=spade.Organization.UnavailableFunction-class.html#__init__,Method spade.Organization_new.BanedUser.__init__()=spade.Organization_new.BanedUser-class.html#__init__,Method spade.Organization_new.CreationError.__init__()=spade.Organization_new.CreationError-class.html#__init__,Method spade.Organization_new.DestroyError.__init__()=spade.Organization_new.DestroyError-class.html#__init__,Method spade.Organization_new.JoinError.__init__()=spade.Organization_new.JoinError-class.html#__init__,Method spade.Organization_new.LastOwner.__init__()=spade.Organization_new.LastOwner-class.html#__init__,Method spade.Organization_new.LockedOrganization.__init__()=spade.Organization_new.LockedOrganization-class.html#__init__,Method spade.Organization_new.MaximumUsers.__init__()=spade.Organization_new.MaximumUsers-class.html#__init__,Method spade.Organization_new.MemberOfFederation.__init__()=spade.Organization_new.MemberOfFederation-class.html#__init__,Method spade.Organization_new.MembersOnly.__init__()=spade.Organization_new.MembersOnly-class.html#__init__,Method spade.Organization_new.NickNameConflict.__init__()=spade.Organization_new.NickNameConflict-class.html#__init__,Method spade.Organization_new.NotCreatePermision.__init__()=spade.Organization_new.NotCreatePermision-class.html#__init__,Method spade.Organization_new.NotSupervisor.__init__()=spade.Organization_new.NotSupervisor-class.html#__init__,Method spade.Organization_new.NotValidGoal.__init__()=spade.Organization_new.NotValidGoal-class.html#__init__,Method spade.Organization_new.NotValidName.__init__()=spade.Organization_new.NotValidName-class.html#__init__,Method spade.Organization_new.NotValidType.__init__()=spade.Organization_new.NotValidType-class.html#__init__,Method spade.Organization_new.NotValidUnit.__init__()=spade.Organization_new.NotValidUnit-class.html#__init__,Method spade.Organization_new.Organization_new.CreateRoomBehaviour.__init__()=spade.Organization_new.Organization_new.CreateRoomBehaviour-class.html#__init__,Method spade.Organization_new.Organization_new.CreateTeamBehaviour.__init__()=spade.Organization_new.Organization_new.CreateTeamBehaviour-class.html#__init__,Method spade.Organization_new.Organization_new.DestroyBehaviour.__init__()=spade.Organization_new.Organization_new.DestroyBehaviour-class.html#__init__,Method spade.Organization_new.Organization_new.GetRegistrationFormBehaviour.__init__()=spade.Organization_new.Organization_new.GetRegistrationFormBehaviour-class.html#__init__,Method spade.Organization_new.Organization_new.GetUnitInfoBehaviour.__init__()=spade.Organization_new.Organization_new.GetUnitInfoBehaviour-class.html#__init__,Method spade.Organization_new.Organization_new.GetUnitListBehaviour.__init__()=spade.Organization_new.Organization_new.GetUnitListBehaviour-class.html#__init__,Method spade.Organization_new.Organization_new.IsMemberBehaviour.__init__()=spade.Organization_new.Organization_new.IsMemberBehaviour-class.html#__init__,Method spade.Organization_new.Organization_new.MyJoinRoomBehaviour.__init__()=spade.Organization_new.Organization_new.MyJoinRoomBehaviour-class.html#__init__,Method spade.Organization_new.Organization_new.SendRegistrationFormBehaviour.__init__()=spade.Organization_new.Organization_new.SendRegistrationFormBehaviour-class.html#__init__,Method spade.Organization_new.Organization_new.TestRoomNameBehaviour.__init__()=spade.Organization_new.Organization_new.TestRoomNameBehaviour-class.html#__init__,Method spade.Organization_new.Organization_new.__init__()=spade.Organization_new.Organization_new-class.html#__init__,Method spade.Organization_new.PaswordNeeded.__init__()=spade.Organization_new.PaswordNeeded-class.html#__init__,Method spade.Organization_new.Unavailable.__init__()=spade.Organization_new.Unavailable-class.html#__init__,Method spade.Organization_new.UnavailableFunction.__init__()=spade.Organization_new.UnavailableFunction-class.html#__init__,Method spade.Platform.PlatformRestart.__init__()=spade.Platform.PlatformRestart-class.html#__init__,Method spade.Platform.SpadePlatform.RouteBehaviour.__init__()=spade.Platform.SpadePlatform.RouteBehaviour-class.html#__init__,Method spade.Platform.SpadePlatform.__init__()=spade.Platform.SpadePlatform-class.html#__init__,Method spade.RDF0Parser.RDF0Parser.__init__()=spade.RDF0Parser.RDF0Parser-class.html#__init__,Method spade.RPC.RPCClientBehaviour.__init__()=spade.RPC.RPCClientBehaviour-class.html#__init__,Method spade.ReceivedObject.ReceivedObject.__init__()=spade.ReceivedObject.ReceivedObject-class.html#__init__,Method spade.SIMBA.SIMBA.OutboxBehaviour.__init__()=spade.SIMBA.SIMBA.OutboxBehaviour-class.html#__init__,Method spade.SIMBA.SIMBA.__init__()=spade.SIMBA.SIMBA-class.html#__init__,Method spade.SL0Parser.SL0Parser.__init__()=spade.SL0Parser.SL0Parser-class.html#__init__,Method spade.SPARQLKB.SPARQLKB.__init__()=spade.SPARQLKB.SPARQLKB-class.html#__init__,Method spade.SWIKB.SWIKB.__init__()=spade.SWIKB.SWIKB-class.html#__init__,Method spade.SpadeConfigParser.ConfigParser.__init__()=spade.SpadeConfigParser.ConfigParser-class.html#__init__,Method spade.SpadeConfigParser.spadeXML.__init__()=spade.SpadeConfigParser.spadeXML-class.html#__init__,Method spade.SpadeConfigParser.spadeXMLHandler.__init__()=spade.SpadeConfigParser.spadeXMLHandler-class.html#__init__,Method spade.Unit.BanedUser.__init__()=spade.Unit.BanedUser-class.html#__init__,Method spade.Unit.CreationError.__init__()=spade.Unit.CreationError-class.html#__init__,Method spade.Unit.DestroyError.__init__()=spade.Unit.DestroyError-class.html#__init__,Method spade.Unit.JoinError.__init__()=spade.Unit.JoinError-class.html#__init__,Method spade.Unit.LastOwner.__init__()=spade.Unit.LastOwner-class.html#__init__,Method spade.Unit.LockedUnit.__init__()=spade.Unit.LockedUnit-class.html#__init__,Method spade.Unit.MaximumUsers.__init__()=spade.Unit.MaximumUsers-class.html#__init__,Method spade.Unit.MembersOnly.__init__()=spade.Unit.MembersOnly-class.html#__init__,Method spade.Unit.NickNameConflict.__init__()=spade.Unit.NickNameConflict-class.html#__init__,Method spade.Unit.NotAdmin.__init__()=spade.Unit.NotAdmin-class.html#__init__,Method spade.Unit.NotSupervisor.__init__()=spade.Unit.NotSupervisor-class.html#__init__,Method spade.Unit.NotValidGoal.__init__()=spade.Unit.NotValidGoal-class.html#__init__,Method spade.Unit.NotValidGoalChange.__init__()=spade.Unit.NotValidGoalChange-class.html#__init__,Method spade.Unit.NotValidName.__init__()=spade.Unit.NotValidName-class.html#__init__,Method spade.Unit.NotValidType.__init__()=spade.Unit.NotValidType-class.html#__init__,Method spade.Unit.NotValidUnit.__init__()=spade.Unit.NotValidUnit-class.html#__init__,Method spade.Unit.PaswordNeeded.__init__()=spade.Unit.PaswordNeeded-class.html#__init__,Method spade.Unit.Unavailable.__init__()=spade.Unit.Unavailable-class.html#__init__,Method spade.Unit.Unit.AddAdminBehaviour.__init__()=spade.Unit.Unit.AddAdminBehaviour-class.html#__init__,Method spade.Unit.Unit.AddBanAgentBehaviour.__init__()=spade.Unit.Unit.AddBanAgentBehaviour-class.html#__init__,Method spade.Unit.Unit.AddModeratorBehaviour.__init__()=spade.Unit.Unit.AddModeratorBehaviour-class.html#__init__,Method spade.Unit.Unit.AddOwnerBehaviour.__init__()=spade.Unit.Unit.AddOwnerBehaviour-class.html#__init__,Method spade.Unit.Unit.CreateRoomBehaviour.__init__()=spade.Unit.Unit.CreateRoomBehaviour-class.html#__init__,Method spade.Unit.Unit.DestroyBehaviour.__init__()=spade.Unit.Unit.DestroyBehaviour-class.html#__init__,Method spade.Unit.Unit.GetAdminListBehaviour.__init__()=spade.Unit.Unit.GetAdminListBehaviour-class.html#__init__,Method spade.Unit.Unit.GetBanAgentListBehaviour.__init__()=spade.Unit.Unit.GetBanAgentListBehaviour-class.html#__init__,Method spade.Unit.Unit.GetGoalBehaviour.__init__()=spade.Unit.Unit.GetGoalBehaviour-class.html#__init__,Method spade.Unit.Unit.GetInfoBehaviour.__init__()=spade.Unit.Unit.GetInfoBehaviour-class.html#__init__,Method spade.Unit.Unit.GetMaxAgentsBehaviour.__init__()=spade.Unit.Unit.GetMaxAgentsBehaviour-class.html#__init__,Method spade.Unit.Unit.GetMemberListBehaviour.__init__()=spade.Unit.Unit.GetMemberListBehaviour-class.html#__init__,Method spade.Unit.Unit.GetMinAgentsBehaviour.__init__()=spade.Unit.Unit.GetMinAgentsBehaviour-class.html#__init__,Method spade.Unit.Unit.GetModeratorListBehaviour.__init__()=spade.Unit.Unit.GetModeratorListBehaviour-class.html#__init__,Method spade.Unit.Unit.GetNumberOfAgentsBehaviour.__init__()=spade.Unit.Unit.GetNumberOfAgentsBehaviour-class.html#__init__,Method spade.Unit.Unit.GetOwnerListBehaviour.__init__()=spade.Unit.Unit.GetOwnerListBehaviour-class.html#__init__,Method spade.Unit.Unit.GiveVoiceBehaviour.__init__()=spade.Unit.Unit.GiveVoiceBehaviour-class.html#__init__,Method spade.Unit.Unit.KickAgentBehaviour.__init__()=spade.Unit.Unit.KickAgentBehaviour-class.html#__init__,Method spade.Unit.Unit.MyJoinRoomBehaviour.__init__()=spade.Unit.Unit.MyJoinRoomBehaviour-class.html#__init__,Method spade.Unit.Unit.PresenceBehaviour.MinAgentsBehaviour.__init__()=spade.Unit.Unit.PresenceBehaviour.MinAgentsBehaviour-class.html#__init__,Method spade.Unit.Unit.PresenceBehaviour.__init__()=spade.Unit.Unit.PresenceBehaviour-class.html#__init__,Method spade.Unit.Unit.RemoveAdminBehaviour.__init__()=spade.Unit.Unit.RemoveAdminBehaviour-class.html#__init__,Method spade.Unit.Unit.RemoveBanAgentBehaviour.__init__()=spade.Unit.Unit.RemoveBanAgentBehaviour-class.html#__init__,Method spade.Unit.Unit.RemoveModeratorBehaviour.__init__()=spade.Unit.Unit.RemoveModeratorBehaviour-class.html#__init__,Method spade.Unit.Unit.RemoveOwnerBehaviour.__init__()=spade.Unit.Unit.RemoveOwnerBehaviour-class.html#__init__,Method spade.Unit.Unit.RevokeVoiceBehaviour.__init__()=spade.Unit.Unit.RevokeVoiceBehaviour-class.html#__init__,Method spade.Unit.Unit.SendMessageBehaviour.__init__()=spade.Unit.Unit.SendMessageBehaviour-class.html#__init__,Method spade.Unit.Unit.SendPrivateMessageBehaviour.__init__()=spade.Unit.Unit.SendPrivateMessageBehaviour-class.html#__init__,Method spade.Unit.Unit.SetGoalBehaviour.__init__()=spade.Unit.Unit.SetGoalBehaviour-class.html#__init__,Method spade.Unit.Unit.SetMaxAgentsBehaviour.__init__()=spade.Unit.Unit.SetMaxAgentsBehaviour-class.html#__init__,Method spade.Unit.Unit.SetMinAgentsBehaviour.__init__()=spade.Unit.Unit.SetMinAgentsBehaviour-class.html#__init__,Method spade.Unit.Unit.TestRoomNameBehaviour.__init__()=spade.Unit.Unit.TestRoomNameBehaviour-class.html#__init__,Method spade.Unit.Unit.__init__()=spade.Unit.Unit-class.html#__init__,Method spade.Unit_new.BanedUser.__init__()=spade.Unit_new.BanedUser-class.html#__init__,Method spade.Unit_new.CreationError.__init__()=spade.Unit_new.CreationError-class.html#__init__,Method spade.Unit_new.DestroyError.__init__()=spade.Unit_new.DestroyError-class.html#__init__,Method spade.Unit_new.JoinError.__init__()=spade.Unit_new.JoinError-class.html#__init__,Method spade.Unit_new.LastOwner.__init__()=spade.Unit_new.LastOwner-class.html#__init__,Method spade.Unit_new.LockedUnit.__init__()=spade.Unit_new.LockedUnit-class.html#__init__,Method spade.Unit_new.MaximumUsers.__init__()=spade.Unit_new.MaximumUsers-class.html#__init__,Method spade.Unit_new.MembersOnly.__init__()=spade.Unit_new.MembersOnly-class.html#__init__,Method spade.Unit_new.NickNameConflict.__init__()=spade.Unit_new.NickNameConflict-class.html#__init__,Method spade.Unit_new.NotCreatePermision.__init__()=spade.Unit_new.NotCreatePermision-class.html#__init__,Method spade.Unit_new.NotSupervisor.__init__()=spade.Unit_new.NotSupervisor-class.html#__init__,Method spade.Unit_new.NotValidGoal.__init__()=spade.Unit_new.NotValidGoal-class.html#__init__,Method spade.Unit_new.NotValidGoalChange.__init__()=spade.Unit_new.NotValidGoalChange-class.html#__init__,Method spade.Unit_new.NotValidName.__init__()=spade.Unit_new.NotValidName-class.html#__init__,Method spade.Unit_new.NotValidType.__init__()=spade.Unit_new.NotValidType-class.html#__init__,Method spade.Unit_new.NotValidUnit.__init__()=spade.Unit_new.NotValidUnit-class.html#__init__,Method spade.Unit_new.PaswordNeeded.__init__()=spade.Unit_new.PaswordNeeded-class.html#__init__,Method spade.Unit_new.Unavailable.__init__()=spade.Unit_new.Unavailable-class.html#__init__,Method spade.Unit_new.Unit_new.AddAdminBehaviour.__init__()=spade.Unit_new.Unit_new.AddAdminBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.AddBanAgentBehaviour.__init__()=spade.Unit_new.Unit_new.AddBanAgentBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.AddModeratorBehaviour.__init__()=spade.Unit_new.Unit_new.AddModeratorBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.CreateRoomBehaviour.__init__()=spade.Unit_new.Unit_new.CreateRoomBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.DestroyBehaviour.__init__()=spade.Unit_new.Unit_new.DestroyBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.GetAdminListBehaviour.__init__()=spade.Unit_new.Unit_new.GetAdminListBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.GetBanAgentListBehaviour.__init__()=spade.Unit_new.Unit_new.GetBanAgentListBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.GetGoalBehaviour.__init__()=spade.Unit_new.Unit_new.GetGoalBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.GetInfoBehaviour.__init__()=spade.Unit_new.Unit_new.GetInfoBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.GetMaxAgentsBehaviour.__init__()=spade.Unit_new.Unit_new.GetMaxAgentsBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.GetMemberListBehaviour.__init__()=spade.Unit_new.Unit_new.GetMemberListBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.GetMinAgentsBehaviour.__init__()=spade.Unit_new.Unit_new.GetMinAgentsBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.GetModeratorListBehaviour.__init__()=spade.Unit_new.Unit_new.GetModeratorListBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.GetNumberOfAgentsBehaviour.__init__()=spade.Unit_new.Unit_new.GetNumberOfAgentsBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.GetOwnerListBehaviour.__init__()=spade.Unit_new.Unit_new.GetOwnerListBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.GiveVoiceBehaviour.__init__()=spade.Unit_new.Unit_new.GiveVoiceBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.KickAgentBehaviour.__init__()=spade.Unit_new.Unit_new.KickAgentBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.MyJoinRoomBehaviour.__init__()=spade.Unit_new.Unit_new.MyJoinRoomBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.PresenceBehaviour.MinAgentsBehaviour.__init__()=spade.Unit_new.Unit_new.PresenceBehaviour.MinAgentsBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.PresenceBehaviour.__init__()=spade.Unit_new.Unit_new.PresenceBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.RemoveAdminBehaviour.__init__()=spade.Unit_new.Unit_new.RemoveAdminBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.RemoveBanAgentBehaviour.__init__()=spade.Unit_new.Unit_new.RemoveBanAgentBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.RemoveModeratorBehaviour.__init__()=spade.Unit_new.Unit_new.RemoveModeratorBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.RevokeVoiceBehaviour.__init__()=spade.Unit_new.Unit_new.RevokeVoiceBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.SendMessageBehaviour.__init__()=spade.Unit_new.Unit_new.SendMessageBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.SendPrivateMessageBehaviour.__init__()=spade.Unit_new.Unit_new.SendPrivateMessageBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.SetGoalBehaviour.__init__()=spade.Unit_new.Unit_new.SetGoalBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.SetMaxAgentsBehaviour.__init__()=spade.Unit_new.Unit_new.SetMaxAgentsBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.SetMinAgentsBehaviour.__init__()=spade.Unit_new.Unit_new.SetMinAgentsBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.TestRoomNameBehaviour.__init__()=spade.Unit_new.Unit_new.TestRoomNameBehaviour-class.html#__init__,Method spade.Unit_new.Unit_new.__init__()=spade.Unit_new.Unit_new-class.html#__init__,Method spade.XMLCodec.XMLCodec.__init__()=spade.XMLCodec.XMLCodec-class.html#__init__,Method spade.XSBKB.XSBKB.__init__()=spade.XSBKB.XSBKB-class.html#__init__,Method spade.bdi.BDIBehaviour.__init__()=spade.bdi.BDIBehaviour-class.html#__init__,Method spade.bdi.Goal.__init__()=spade.bdi.Goal-class.html#__init__,Method spade.content.ContentObject.__init__()=spade.content.ContentObject-class.html#__init__,Method spade.dblite.Base.__init__()=spade.dblite.Base-class.html#__init__,Method spade.dblite.Index.__init__()=spade.dblite.Index-class.html#__init__,Method spade.fipa.ModifyAgentBehaviour.__init__()=spade.fipa.ModifyAgentBehaviour-class.html#__init__,Method spade.fipa.SearchAgentBehaviour.__init__()=spade.fipa.SearchAgentBehaviour-class.html#__init__,Method spade.fipa.deregisterServiceBehaviour.__init__()=spade.fipa.deregisterServiceBehaviour-class.html#__init__,Method spade.fipa.getPlatformInfoBehaviour.__init__()=spade.fipa.getPlatformInfoBehaviour-class.html#__init__,Method spade.fipa.modifyServiceBehaviour.__init__()=spade.fipa.modifyServiceBehaviour-class.html#__init__,Method spade.fipa.registerServiceBehaviour.__init__()=spade.fipa.registerServiceBehaviour-class.html#__init__,Method spade.fipa.searchServiceBehaviour.__init__()=spade.fipa.searchServiceBehaviour-class.html#__init__,Method spade.kb.KB.__init__()=spade.kb.KB-class.html#__init__,Method spade.kb.KBConfigurationFailed.__init__()=spade.kb.KBConfigurationFailed-class.html#__init__,Method spade.logic.Expr.__init__()=spade.logic.Expr-class.html#__init__,Method spade.logic.FolKB.__init__()=spade.logic.FolKB-class.html#__init__,Method spade.logic.KB.__init__()=spade.logic.KB-class.html#__init__,Method spade.logic.PropKB.__init__()=spade.logic.PropKB-class.html#__init__,Method spade.odict.odict.__init__()=spade.odict.odict-class.html#__init__,Method spade.peer2peer.RequestDiscoInfoBehav.__init__()=spade.peer2peer.RequestDiscoInfoBehav-class.html#__init__,Method spade.peer2peer.SendStreamInitiationBehav.__init__()=spade.peer2peer.SendStreamInitiationBehav-class.html#__init__,Method spade.pubsub.PubSub.__init__()=spade.pubsub.PubSub-class.html#__init__,Method spade.pubsub.PubSub._sendAndReceiveBehav.__init__()=spade.pubsub.PubSub._sendAndReceiveBehav-class.html#__init__,Method spade.pygooglechart.Axis.__init__()=spade.pygooglechart.Axis-class.html#__init__,Method spade.pygooglechart.BarChart.__init__()=spade.pygooglechart.BarChart-class.html#__init__,Method spade.pygooglechart.Chart.__init__()=spade.pygooglechart.Chart-class.html#__init__,Method spade.pygooglechart.ChartGrammar.__init__()=spade.pygooglechart.ChartGrammar-class.html#__init__,Method spade.pygooglechart.Data.__init__()=spade.pygooglechart.Data-class.html#__init__,Method spade.pygooglechart.GoogleOMeterChart.__init__()=spade.pygooglechart.GoogleOMeterChart-class.html#__init__,Method spade.pygooglechart.GroupedBarChart.__init__()=spade.pygooglechart.GroupedBarChart-class.html#__init__,Method spade.pygooglechart.LabelAxis.__init__()=spade.pygooglechart.LabelAxis-class.html#__init__,Method spade.pygooglechart.LineChart.__init__()=spade.pygooglechart.LineChart-class.html#__init__,Method spade.pygooglechart.MapChart.__init__()=spade.pygooglechart.MapChart-class.html#__init__,Method spade.pygooglechart.PieChart.__init__()=spade.pygooglechart.PieChart-class.html#__init__,Method spade.pygooglechart.QRChart.__init__()=spade.pygooglechart.QRChart-class.html#__init__,Method spade.pygooglechart.RangeAxis.__init__()=spade.pygooglechart.RangeAxis-class.html#__init__,Method spade.pyparsing.And.__init__()=spade.pyparsing.And-class.html#__init__,Method spade.pyparsing.CaselessLiteral.__init__()=spade.pyparsing.CaselessLiteral-class.html#__init__,Method spade.pyparsing.CharsNotIn.__init__()=spade.pyparsing.CharsNotIn-class.html#__init__,Method spade.pyparsing.Combine.__init__()=spade.pyparsing.Combine-class.html#__init__,Method spade.pyparsing.Dict.__init__()=spade.pyparsing.Dict-class.html#__init__,Method spade.pyparsing.Each.__init__()=spade.pyparsing.Each-class.html#__init__,Method spade.pyparsing.Empty.__init__()=spade.pyparsing.Empty-class.html#__init__,Method spade.pyparsing.FollowedBy.__init__()=spade.pyparsing.FollowedBy-class.html#__init__,Method spade.pyparsing.Forward.__init__()=spade.pyparsing.Forward-class.html#__init__,Method spade.pyparsing.GoToColumn.__init__()=spade.pyparsing.GoToColumn-class.html#__init__,Method spade.pyparsing.Group.__init__()=spade.pyparsing.Group-class.html#__init__,Method spade.pyparsing.Keyword.__init__()=spade.pyparsing.Keyword-class.html#__init__,Method spade.pyparsing.LineEnd.__init__()=spade.pyparsing.LineEnd-class.html#__init__,Method spade.pyparsing.LineStart.__init__()=spade.pyparsing.LineStart-class.html#__init__,Method spade.pyparsing.Literal.__init__()=spade.pyparsing.Literal-class.html#__init__,Method spade.pyparsing.MatchFirst.__init__()=spade.pyparsing.MatchFirst-class.html#__init__,Method spade.pyparsing.NoMatch.__init__()=spade.pyparsing.NoMatch-class.html#__init__,Method spade.pyparsing.NotAny.__init__()=spade.pyparsing.NotAny-class.html#__init__,Method spade.pyparsing.Optional.__init__()=spade.pyparsing.Optional-class.html#__init__,Method spade.pyparsing.Or.__init__()=spade.pyparsing.Or-class.html#__init__,Method spade.pyparsing.ParseBaseException.__init__()=spade.pyparsing.ParseBaseException-class.html#__init__,Method spade.pyparsing.ParseElementEnhance.__init__()=spade.pyparsing.ParseElementEnhance-class.html#__init__,Method spade.pyparsing.ParseExpression.__init__()=spade.pyparsing.ParseExpression-class.html#__init__,Method spade.pyparsing.ParseResults.__init__()=spade.pyparsing.ParseResults-class.html#__init__,Method spade.pyparsing.ParserElement.__init__()=spade.pyparsing.ParserElement-class.html#__init__,Method spade.pyparsing.PositionToken.__init__()=spade.pyparsing.PositionToken-class.html#__init__,Method spade.pyparsing.RecursiveGrammarException.__init__()=spade.pyparsing.RecursiveGrammarException-class.html#__init__,Method spade.pyparsing.SkipTo.__init__()=spade.pyparsing.SkipTo-class.html#__init__,Method spade.pyparsing.StringEnd.__init__()=spade.pyparsing.StringEnd-class.html#__init__,Method spade.pyparsing.StringStart.__init__()=spade.pyparsing.StringStart-class.html#__init__,Method spade.pyparsing.Token.__init__()=spade.pyparsing.Token-class.html#__init__,Method spade.pyparsing.TokenConverter.__init__()=spade.pyparsing.TokenConverter-class.html#__init__,Method spade.pyparsing.Upcase.__init__()=spade.pyparsing.Upcase-class.html#__init__,Method spade.pyparsing.White.__init__()=spade.pyparsing.White-class.html#__init__,Method spade.pyparsing.Word.__init__()=spade.pyparsing.Word-class.html#__init__,Method spade.pyparsing.ZeroOrMore.__init__()=spade.pyparsing.ZeroOrMore-class.html#__init__,Method spade.pyratemp.FileLoader.__init__()=spade.pyratemp.FileLoader-class.html#__init__,Method spade.pyratemp.Parser.__init__()=spade.pyratemp.Parser-class.html#__init__,Method spade.pyratemp.PseudoSandbox.__init__()=spade.pyratemp.PseudoSandbox-class.html#__init__,Method spade.pyratemp.Renderer.__init__()=spade.pyratemp.Renderer-class.html#__init__,Method spade.pyratemp.StringLoader.__init__()=spade.pyratemp.StringLoader-class.html#__init__,Method spade.pyratemp.Template.__init__()=spade.pyratemp.Template-class.html#__init__,Method spade.pyratemp.TemplateBase.__init__()=spade.pyratemp.TemplateBase-class.html#__init__,Method spade.pyratemp.TemplateEval.__init__()=spade.pyratemp.TemplateEval-class.html#__init__,Method spade.pyratemp.TemplateParseError.__init__()=spade.pyratemp.TemplateParseError-class.html#__init__,Method spade.pyxf.eclipse.__init__()=spade.pyxf.eclipse-class.html#__init__,Method spade.pyxf.flora2.__init__()=spade.pyxf.flora2-class.html#__init__,Method spade.pyxf.swipl.__init__()=spade.pyxf.swipl-class.html#__init__,Method spade.pyxf.xsb.__init__()=spade.pyxf.xsb-class.html#__init__,Method spade.socialnetwork.SocialItem.__init__()=spade.socialnetwork.SocialItem-class.html#__init__,Method spade.spade_backend.SpadeBackend.__init__()=spade.spade_backend.SpadeBackend-class.html#__init__,Method spade.tbcbp.Case.__init__()=spade.tbcbp.Case-class.html#__init__,Method spade.tbcbp.CaseDB.__init__()=spade.tbcbp.CaseDB-class.html#__init__,Method spade.tbcbp.Plan.__init__()=spade.tbcbp.Plan-class.html#__init__,Method spade.tbcbp.TBCBP.__init__()=spade.tbcbp.TBCBP-class.html#__init__,Method spade.wui.WUI.__init__()=spade.wui.WUI-class.html#__init__,Method spade.xmpp.auth.Bind.__init__()=spade.xmpp.auth.Bind-class.html#__init__,Method spade.xmpp.auth.ComponentBind.__init__()=spade.xmpp.auth.ComponentBind-class.html#__init__,Method spade.xmpp.auth.NonSASL.__init__()=spade.xmpp.auth.NonSASL-class.html#__init__,Method spade.xmpp.auth.SASL.__init__()=spade.xmpp.auth.SASL-class.html#__init__,Method spade.xmpp.browser.Browser.__init__()=spade.xmpp.browser.Browser-class.html#__init__,Method spade.xmpp.client.CommonClient.__init__()=spade.xmpp.client.CommonClient-class.html#__init__,Method spade.xmpp.client.Component.__init__()=spade.xmpp.client.Component-class.html#__init__,Method spade.xmpp.client.PlugIn.__init__()=spade.xmpp.client.PlugIn-class.html#__init__,Method spade.xmpp.commands.Command_Handler_Prototype.__init__()=spade.xmpp.commands.Command_Handler_Prototype-class.html#__init__,Method spade.xmpp.commands.Commands.__init__()=spade.xmpp.commands.Commands-class.html#__init__,Method spade.xmpp.commands.TestCommand.__init__()=spade.xmpp.commands.TestCommand-class.html#__init__,Method spade.xmpp.debug.Debug.__init__()=spade.xmpp.debug.Debug-class.html#__init__,Method spade.xmpp.debug.NoDebug.__init__()=spade.xmpp.debug.NoDebug-class.html#__init__,Method spade.xmpp.dispatcher.Dispatcher.__init__()=spade.xmpp.dispatcher.Dispatcher-class.html#__init__,Method spade.xmpp.filetransfer.IBB.__init__()=spade.xmpp.filetransfer.IBB-class.html#__init__,Method spade.xmpp.protocol.DataField.__init__()=spade.xmpp.protocol.DataField-class.html#__init__,Method spade.xmpp.protocol.DataForm.__init__()=spade.xmpp.protocol.DataForm-class.html#__init__,Method spade.xmpp.protocol.Error.__init__()=spade.xmpp.protocol.Error-class.html#__init__,Method spade.xmpp.protocol.ErrorNode.__init__()=spade.xmpp.protocol.ErrorNode-class.html#__init__,Method spade.xmpp.protocol.Iq.__init__()=spade.xmpp.protocol.Iq-class.html#__init__,Method spade.xmpp.protocol.JID.__init__()=spade.xmpp.protocol.JID-class.html#__init__,Method spade.xmpp.protocol.Message.__init__()=spade.xmpp.protocol.Message-class.html#__init__,Method spade.xmpp.protocol.Presence.__init__()=spade.xmpp.protocol.Presence-class.html#__init__,Method spade.xmpp.protocol.Protocol.__init__()=spade.xmpp.protocol.Protocol-class.html#__init__,Method spade.xmpp.roster.Roster.__init__()=spade.xmpp.roster.Roster-class.html#__init__,Method spade.xmpp.session.Session.__init__()=spade.xmpp.session.Session-class.html#__init__,Method spade.xmpp.simplexml.Node.__init__()=spade.xmpp.simplexml.Node-class.html#__init__,Method spade.xmpp.simplexml.NodeBuilder.__init__()=spade.xmpp.simplexml.NodeBuilder-class.html#__init__,Method spade.xmpp.simplexml.T.__init__()=spade.xmpp.simplexml.T-class.html#__init__,Method spade.xmpp.transports.HTTPPROXYsocket.__init__()=spade.xmpp.transports.HTTPPROXYsocket-class.html#__init__,Method spade.xmpp.transports.TCPsocket.__init__()=spade.xmpp.transports.TCPsocket-class.html#__init__,Method spade.xmpp.transports.error.__init__()=spade.xmpp.transports.error-class.html#__init__,Method spade.xmppd.modules.config.Config.__init__()=spade.xmppd.modules.config.Config-class.html#__init__,Method spade.xmppd.modules.config.xmppdXML.__init__()=spade.xmppd.modules.config.xmppdXML-class.html#__init__,Method spade.xmppd.modules.config.xmppdXMLHandler.__init__()=spade.xmppd.modules.config.xmppdXMLHandler-class.html#__init__,Method spade.xmppd.modules.muc.BadPassword.__init__()=spade.xmppd.modules.muc.BadPassword-class.html#__init__,Method spade.xmppd.modules.muc.Blacklisted.__init__()=spade.xmppd.modules.muc.Blacklisted-class.html#__init__,Method spade.xmppd.modules.muc.MaxUsers.__init__()=spade.xmppd.modules.muc.MaxUsers-class.html#__init__,Method spade.xmppd.modules.muc.NickLockedDown.__init__()=spade.xmppd.modules.muc.NickLockedDown-class.html#__init__,Method spade.xmppd.modules.muc.NoVoice.__init__()=spade.xmppd.modules.muc.NoVoice-class.html#__init__,Method spade.xmppd.modules.muc.NotAMember.__init__()=spade.xmppd.modules.muc.NotAMember-class.html#__init__,Method spade.xmppd.modules.muc.Participant.__init__()=spade.xmppd.modules.muc.Participant-class.html#__init__,Method spade.xmppd.modules.muc.Room.__init__()=spade.xmppd.modules.muc.Room-class.html#__init__,Method spade.xmppd.modules.muc.SerializableRoom.__init__()=spade.xmppd.modules.muc.SerializableRoom-class.html#__init__,Method spade.xmppd.modules.pubsub.PSNode.__init__()=spade.xmppd.modules.pubsub.PSNode-class.html#__init__,Method spade.xmppd.modules.wq.Conflict.__init__()=spade.xmppd.modules.wq.Conflict-class.html#__init__,Method spade.xmppd.modules.wq.Group.__init__()=spade.xmppd.modules.wq.Group-class.html#__init__,Method spade.xmppd.modules.wq.ItemNotFound.__init__()=spade.xmppd.modules.wq.ItemNotFound-class.html#__init__,Method spade.xmppd.xmppd.RPC_Client.__init__()=spade.xmppd.xmppd.RPC_Client-class.html#__init__,Method spade.xmppd.xmppd.Server.__init__()=spade.xmppd.xmppd.Server-class.html#__init__,Method spade.xmppd.xmppd.Session.__init__()=spade.xmppd.xmppd.Session-class.html#__init__,Method spade.xmppd.xmppd.Session_Dummy.Stream.__init__()=spade.xmppd.xmppd.Session_Dummy.Stream-class.html#__init__,Method spade.xmppd.xmppd.Session_Dummy.__init__()=spade.xmppd.xmppd.Session_Dummy-class.html#__init__,Method spade.xmppd.xmppd.Socker_client.__init__()=spade.xmppd.xmppd.Socker_client-class.html#__init__,Method spade.xmppd.xmppd.fake_select.__init__()=spade.xmppd.xmppd.fake_select-class.html#__init__,Method spade.xmppd.xmppd.fake_select.poll.__init__()=spade.xmppd.xmppd.fake_select.poll-class.html#__init__,Method spade.xmppd.xmppd.get_input.__init__()=spade.xmppd.xmppd.get_input-class.html#__init__,Method spade.xmppd.xmppd.localizer.__init__()=spade.xmppd.xmppd.localizer-class.html#__init__,Method spade.xmppd.xmppd.multisession_manager.__init__()=spade.xmppd.xmppd.multisession_manager-class.html#__init__,Method spade.xmppd.xmppd.multisession_manager.multisession_thread.__init__()=spade.xmppd.xmppd.multisession_manager.multisession_thread-class.html#__init__"><a title="spade.ACLMessage.ACLMessage.__init__
spade.ACLParser.ACLParser.__init__
spade.ACLParser.ACLxmlParser.__init__
spade.AID.aid.__init__
spade.AMS.AMS.DefaultBehaviour.__init__
spade.AMS.AMS.ModifyBehaviour.__init__
spade.AMS.AMS.PlatformBehaviour.__init__
spade.AMS.AMS.RegisterBehaviour.__init__
spade.AMS.AMS.SearchBehaviour.__init__
spade.AMS.AMS.__init__
spade.AMS.AmsAgentDescription.__init__
spade.Agent.AbstractAgent.__init__
spade.Agent.Agent.__init__
spade.Agent.PlatformAgent.__init__
spade.Agent.jabberProcess.__init__
spade.BasicFipaDateTime.BasicFipaDateTime.__init__
spade.Behaviour.ACLTemplate.__init__
spade.Behaviour.ANDTemplate.__init__
spade.Behaviour.Behaviour.__init__
spade.Behaviour.BehaviourTemplate.__init__
spade.Behaviour.EventBehaviour.__init__
spade.Behaviour.FSMBehaviour.__init__
spade.Behaviour.MessageTemplate.__init__
spade.Behaviour.NOTTemplate.__init__
spade.Behaviour.ORTemplate.__init__
spade.Behaviour.OneShotBehaviour.__init__
spade.Behaviour.PeriodicBehaviour.__init__
spade.Behaviour.TimeOutBehaviour.__init__
spade.Behaviour.XORTemplate.__init__
spade.DF.DF.DefaultBehaviour.__init__
spade.DF.DF.ModifyBehaviour.__init__
spade.DF.DF.RegisterBehaviour.__init__
spade.DF.DF.SearchBehaviour.__init__
spade.DF.DF.__init__
spade.DF.DfAgentDescription.__init__
spade.DF.Service.__init__
spade.DF.ServiceDescription.__init__
spade.ECLiPSeKB.ECLiPSeKB.__init__
spade.Envelope.Envelope.__init__
spade.FIPAMessage.FipaMessage.__init__
spade.Flora2KB.Flora2KB.__init__
spade.MTP.MTP.__init__
spade.MessageReceiver.MessageReceiver.__init__
spade.Organization.BanedUser.__init__
spade.Organization.CreationError.__init__
spade.Organization.DestroyError.__init__
spade.Organization.JoinError.__init__
spade.Organization.LastOwner.__init__
spade.Organization.LockedOrganization.__init__
spade.Organization.MaximumUsers.__init__
spade.Organization.MemberOfFederation.__init__
spade.Organization.MembersOnly.__init__
spade.Organization.NickNameConflict.__init__
spade.Organization.NotOwner.__init__
spade.Organization.NotSupervisor.__init__
spade.Organization.NotValidGoal.__init__
spade.Organization.NotValidName.__init__
spade.Organization.NotValidType.__init__
spade.Organization.NotValidUnit.__init__
spade.Organization.Organization.CreateRoomBehaviour.__init__
spade.Organization.Organization.CreateTeamBehaviour.__init__
spade.Organization.Organization.DestroyBehaviour.__init__
spade.Organization.Organization.GetRegistrationFormBehaviour.__init__
spade.Organization.Organization.GetUnitInfoBehaviour.__init__
spade.Organization.Organization.GetUnitListBehaviour.__init__
spade.Organization.Organization.IsMemberBehaviour.__init__
spade.Organization.Organization.MyJoinRoomBehaviour.__init__
spade.Organization.Organization.SendRegistrationFormBehaviour.__init__
spade.Organization.Organization.TestRoomNameBehaviour.__init__
spade.Organization.Organization.__init__
spade.Organization.PaswordNeeded.__init__
spade.Organization.Unavailable.__init__
spade.Organization.UnavailableFunction.__init__
spade.Organization_new.BanedUser.__init__
spade.Organization_new.CreationError.__init__
spade.Organization_new.DestroyError.__init__
spade.Organization_new.JoinError.__init__
spade.Organization_new.LastOwner.__init__
spade.Organization_new.LockedOrganization.__init__
spade.Organization_new.MaximumUsers.__init__
spade.Organization_new.MemberOfFederation.__init__
spade.Organization_new.MembersOnly.__init__
spade.Organization_new.NickNameConflict.__init__
spade.Organization_new.NotCreatePermision.__init__
spade.Organization_new.NotSupervisor.__init__
spade.Organization_new.NotValidGoal.__init__
spade.Organization_new.NotValidName.__init__
spade.Organization_new.NotValidType.__init__
spade.Organization_new.NotValidUnit.__init__
spade.Organization_new.Organization_new.CreateRoomBehaviour.__init__
spade.Organization_new.Organization_new.CreateTeamBehaviour.__init__
spade.Organization_new.Organization_new.DestroyBehaviour.__init__
spade.Organization_new.Organization_new.GetRegistrationFormBehaviour.__init__
spade.Organization_new.Organization_new.GetUnitInfoBehaviour.__init__
spade.Organization_new.Organization_new.GetUnitListBehaviour.__init__
spade.Organization_new.Organization_new.IsMemberBehaviour.__init__
spade.Organization_new.Organization_new.MyJoinRoomBehaviour.__init__
spade.Organization_new.Organization_new.SendRegistrationFormBehaviour.__init__
spade.Organization_new.Organization_new.TestRoomNameBehaviour.__init__
spade.Organization_new.Organization_new.__init__
spade.Organization_new.PaswordNeeded.__init__
spade.Organization_new.Unavailable.__init__
spade.Organization_new.UnavailableFunction.__init__
spade.Platform.PlatformRestart.__init__
spade.Platform.SpadePlatform.RouteBehaviour.__init__
spade.Platform.SpadePlatform.__init__
spade.RDF0Parser.RDF0Parser.__init__
spade.RPC.RPCClientBehaviour.__init__
spade.ReceivedObject.ReceivedObject.__init__
spade.SIMBA.SIMBA.OutboxBehaviour.__init__
spade.SIMBA.SIMBA.__init__
spade.SL0Parser.SL0Parser.__init__
spade.SPARQLKB.SPARQLKB.__init__
spade.SWIKB.SWIKB.__init__
spade.SpadeConfigParser.ConfigParser.__init__
spade.SpadeConfigParser.spadeXML.__init__
spade.SpadeConfigParser.spadeXMLHandler.__init__
spade.Unit.BanedUser.__init__
spade.Unit.CreationError.__init__
spade.Unit.DestroyError.__init__
spade.Unit.JoinError.__init__
spade.Unit.LastOwner.__init__
spade.Unit.LockedUnit.__init__
spade.Unit.MaximumUsers.__init__
spade.Unit.MembersOnly.__init__
spade.Unit.NickNameConflict.__init__
spade.Unit.NotAdmin.__init__
spade.Unit.NotSupervisor.__init__
spade.Unit.NotValidGoal.__init__
spade.Unit.NotValidGoalChange.__init__
spade.Unit.NotValidName.__init__
spade.Unit.NotValidType.__init__
spade.Unit.NotValidUnit.__init__
spade.Unit.PaswordNeeded.__init__
spade.Unit.Unavailable.__init__
spade.Unit.Unit.AddAdminBehaviour.__init__
spade.Unit.Unit.AddBanAgentBehaviour.__init__
spade.Unit.Unit.AddModeratorBehaviour.__init__
spade.Unit.Unit.AddOwnerBehaviour.__init__
spade.Unit.Unit.CreateRoomBehaviour.__init__
spade.Unit.Unit.DestroyBehaviour.__init__
spade.Unit.Unit.GetAdminListBehaviour.__init__
spade.Unit.Unit.GetBanAgentListBehaviour.__init__
spade.Unit.Unit.GetGoalBehaviour.__init__
spade.Unit.Unit.GetInfoBehaviour.__init__
spade.Unit.Unit.GetMaxAgentsBehaviour.__init__
spade.Unit.Unit.GetMemberListBehaviour.__init__
spade.Unit.Unit.GetMinAgentsBehaviour.__init__
spade.Unit.Unit.GetModeratorListBehaviour.__init__
spade.Unit.Unit.GetNumberOfAgentsBehaviour.__init__
spade.Unit.Unit.GetOwnerListBehaviour.__init__
spade.Unit.Unit.GiveVoiceBehaviour.__init__
spade.Unit.Unit.KickAgentBehaviour.__init__
spade.Unit.Unit.MyJoinRoomBehaviour.__init__
spade.Unit.Unit.PresenceBehaviour.MinAgentsBehaviour.__init__
spade.Unit.Unit.PresenceBehaviour.__init__
spade.Unit.Unit.RemoveAdminBehaviour.__init__
spade.Unit.Unit.RemoveBanAgentBehaviour.__init__
spade.Unit.Unit.RemoveModeratorBehaviour.__init__
spade.Unit.Unit.RemoveOwnerBehaviour.__init__
spade.Unit.Unit.RevokeVoiceBehaviour.__init__
spade.Unit.Unit.SendMessageBehaviour.__init__
spade.Unit.Unit.SendPrivateMessageBehaviour.__init__
spade.Unit.Unit.SetGoalBehaviour.__init__
spade.Unit.Unit.SetMaxAgentsBehaviour.__init__
spade.Unit.Unit.SetMinAgentsBehaviour.__init__
spade.Unit.Unit.TestRoomNameBehaviour.__init__
spade.Unit.Unit.__init__
spade.Unit_new.BanedUser.__init__
spade.Unit_new.CreationError.__init__
spade.Unit_new.DestroyError.__init__
spade.Unit_new.JoinError.__init__
spade.Unit_new.LastOwner.__init__
spade.Unit_new.LockedUnit.__init__
spade.Unit_new.MaximumUsers.__init__
spade.Unit_new.MembersOnly.__init__
spade.Unit_new.NickNameConflict.__init__
spade.Unit_new.NotCreatePermision.__init__
spade.Unit_new.NotSupervisor.__init__
spade.Unit_new.NotValidGoal.__init__
spade.Unit_new.NotValidGoalChange.__init__
spade.Unit_new.NotValidName.__init__
spade.Unit_new.NotValidType.__init__
spade.Unit_new.NotValidUnit.__init__
spade.Unit_new.PaswordNeeded.__init__
spade.Unit_new.Unavailable.__init__
spade.Unit_new.Unit_new.AddAdminBehaviour.__init__
spade.Unit_new.Unit_new.AddBanAgentBehaviour.__init__
spade.Unit_new.Unit_new.AddModeratorBehaviour.__init__
spade.Unit_new.Unit_new.CreateRoomBehaviour.__init__
spade.Unit_new.Unit_new.DestroyBehaviour.__init__
spade.Unit_new.Unit_new.GetAdminListBehaviour.__init__
spade.Unit_new.Unit_new.GetBanAgentListBehaviour.__init__
spade.Unit_new.Unit_new.GetGoalBehaviour.__init__
spade.Unit_new.Unit_new.GetInfoBehaviour.__init__
spade.Unit_new.Unit_new.GetMaxAgentsBehaviour.__init__
spade.Unit_new.Unit_new.GetMemberListBehaviour.__init__
spade.Unit_new.Unit_new.GetMinAgentsBehaviour.__init__
spade.Unit_new.Unit_new.GetModeratorListBehaviour.__init__
spade.Unit_new.Unit_new.GetNumberOfAgentsBehaviour.__init__
spade.Unit_new.Unit_new.GetOwnerListBehaviour.__init__
spade.Unit_new.Unit_new.GiveVoiceBehaviour.__init__
spade.Unit_new.Unit_new.KickAgentBehaviour.__init__
spade.Unit_new.Unit_new.MyJoinRoomBehaviour.__init__
spade.Unit_new.Unit_new.PresenceBehaviour.MinAgentsBehaviour.__init__
spade.Unit_new.Unit_new.PresenceBehaviour.__init__
spade.Unit_new.Unit_new.RemoveAdminBehaviour.__init__
spade.Unit_new.Unit_new.RemoveBanAgentBehaviour.__init__
spade.Unit_new.Unit_new.RemoveModeratorBehaviour.__init__
spade.Unit_new.Unit_new.RevokeVoiceBehaviour.__init__
spade.Unit_new.Unit_new.SendMessageBehaviour.__init__
spade.Unit_new.Unit_new.SendPrivateMessageBehaviour.__init__
spade.Unit_new.Unit_new.SetGoalBehaviour.__init__
spade.Unit_new.Unit_new.SetMaxAgentsBehaviour.__init__
spade.Unit_new.Unit_new.SetMinAgentsBehaviour.__init__
spade.Unit_new.Unit_new.TestRoomNameBehaviour.__init__
spade.Unit_new.Unit_new.__init__
spade.XMLCodec.XMLCodec.__init__
spade.XSBKB.XSBKB.__init__
spade.bdi.BDIBehaviour.__init__
spade.bdi.Goal.__init__
spade.content.ContentObject.__init__
spade.dblite.Base.__init__
spade.dblite.Index.__init__
spade.fipa.ModifyAgentBehaviour.__init__
spade.fipa.SearchAgentBehaviour.__init__
spade.fipa.deregisterServiceBehaviour.__init__
spade.fipa.getPlatformInfoBehaviour.__init__
spade.fipa.modifyServiceBehaviour.__init__
spade.fipa.registerServiceBehaviour.__init__
spade.fipa.searchServiceBehaviour.__init__
spade.kb.KB.__init__
spade.kb.KBConfigurationFailed.__init__
spade.logic.Expr.__init__
spade.logic.FolKB.__init__
spade.logic.KB.__init__
spade.logic.PropKB.__init__
spade.odict.odict.__init__
spade.peer2peer.RequestDiscoInfoBehav.__init__
spade.peer2peer.SendStreamInitiationBehav.__init__
spade.pubsub.PubSub.__init__
spade.pubsub.PubSub._sendAndReceiveBehav.__init__
spade.pygooglechart.Axis.__init__
spade.pygooglechart.BarChart.__init__
spade.pygooglechart.Chart.__init__
spade.pygooglechart.ChartGrammar.__init__
spade.pygooglechart.Data.__init__
spade.pygooglechart.GoogleOMeterChart.__init__
spade.pygooglechart.GroupedBarChart.__init__
spade.pygooglechart.LabelAxis.__init__
spade.pygooglechart.LineChart.__init__
spade.pygooglechart.MapChart.__init__
spade.pygooglechart.PieChart.__init__
spade.pygooglechart.QRChart.__init__
spade.pygooglechart.RangeAxis.__init__
spade.pyparsing.And.__init__
spade.pyparsing.CaselessLiteral.__init__
spade.pyparsing.CharsNotIn.__init__
spade.pyparsing.Combine.__init__
spade.pyparsing.Dict.__init__
spade.pyparsing.Each.__init__
spade.pyparsing.Empty.__init__
spade.pyparsing.FollowedBy.__init__
spade.pyparsing.Forward.__init__
spade.pyparsing.GoToColumn.__init__
spade.pyparsing.Group.__init__
spade.pyparsing.Keyword.__init__
spade.pyparsing.LineEnd.__init__
spade.pyparsing.LineStart.__init__
spade.pyparsing.Literal.__init__
spade.pyparsing.MatchFirst.__init__
spade.pyparsing.NoMatch.__init__
spade.pyparsing.NotAny.__init__
spade.pyparsing.Optional.__init__
spade.pyparsing.Or.__init__
spade.pyparsing.ParseBaseException.__init__
spade.pyparsing.ParseElementEnhance.__init__
spade.pyparsing.ParseExpression.__init__
spade.pyparsing.ParseResults.__init__
spade.pyparsing.ParserElement.__init__
spade.pyparsing.PositionToken.__init__
spade.pyparsing.RecursiveGrammarException.__init__
spade.pyparsing.SkipTo.__init__
spade.pyparsing.StringEnd.__init__
spade.pyparsing.StringStart.__init__
spade.pyparsing.Token.__init__
spade.pyparsing.TokenConverter.__init__
spade.pyparsing.Upcase.__init__
spade.pyparsing.White.__init__
spade.pyparsing.Word.__init__
spade.pyparsing.ZeroOrMore.__init__
spade.pyratemp.FileLoader.__init__
spade.pyratemp.Parser.__init__
spade.pyratemp.PseudoSandbox.__init__
spade.pyratemp.Renderer.__init__
spade.pyratemp.StringLoader.__init__
spade.pyratemp.Template.__init__
spade.pyratemp.TemplateBase.__init__
spade.pyratemp.TemplateEval.__init__
spade.pyratemp.TemplateParseError.__init__
spade.pyxf.eclipse.__init__
spade.pyxf.flora2.__init__
spade.pyxf.swipl.__init__
spade.pyxf.xsb.__init__
spade.socialnetwork.SocialItem.__init__
spade.spade_backend.SpadeBackend.__init__
spade.tbcbp.Case.__init__
spade.tbcbp.CaseDB.__init__
spade.tbcbp.Plan.__init__
spade.tbcbp.TBCBP.__init__
spade.wui.WUI.__init__
spade.xmpp.auth.Bind.__init__
spade.xmpp.auth.ComponentBind.__init__
spade.xmpp.auth.NonSASL.__init__
spade.xmpp.auth.SASL.__init__
spade.xmpp.browser.Browser.__init__
spade.xmpp.client.CommonClient.__init__
spade.xmpp.client.Component.__init__
spade.xmpp.client.PlugIn.__init__
spade.xmpp.commands.Command_Handler_Prototype.__init__
spade.xmpp.commands.Commands.__init__
spade.xmpp.commands.TestCommand.__init__
spade.xmpp.debug.Debug.__init__
spade.xmpp.debug.NoDebug.__init__
spade.xmpp.dispatcher.Dispatcher.__init__
spade.xmpp.filetransfer.IBB.__init__
spade.xmpp.protocol.DataField.__init__
spade.xmpp.protocol.DataForm.__init__
spade.xmpp.protocol.Error.__init__
spade.xmpp.protocol.ErrorNode.__init__
spade.xmpp.protocol.Iq.__init__
spade.xmpp.protocol.JID.__init__
spade.xmpp.protocol.Message.__init__
spade.xmpp.protocol.Presence.__init__
spade.xmpp.protocol.Protocol.__init__
spade.xmpp.roster.Roster.__init__
spade.xmpp.session.Session.__init__
spade.xmpp.simplexml.Node.__init__
spade.xmpp.simplexml.NodeBuilder.__init__
spade.xmpp.simplexml.T.__init__
spade.xmpp.transports.HTTPPROXYsocket.__init__
spade.xmpp.transports.TCPsocket.__init__
spade.xmpp.transports.error.__init__
spade.xmppd.modules.config.Config.__init__
spade.xmppd.modules.config.xmppdXML.__init__
spade.xmppd.modules.config.xmppdXMLHandler.__init__
spade.xmppd.modules.muc.BadPassword.__init__
spade.xmppd.modules.muc.Blacklisted.__init__
spade.xmppd.modules.muc.MaxUsers.__init__
spade.xmppd.modules.muc.NickLockedDown.__init__
spade.xmppd.modules.muc.NoVoice.__init__
spade.xmppd.modules.muc.NotAMember.__init__
spade.xmppd.modules.muc.Participant.__init__
spade.xmppd.modules.muc.Room.__init__
spade.xmppd.modules.muc.SerializableRoom.__init__
spade.xmppd.modules.pubsub.PSNode.__init__
spade.xmppd.modules.wq.Conflict.__init__
spade.xmppd.modules.wq.Group.__init__
spade.xmppd.modules.wq.ItemNotFound.__init__
spade.xmppd.xmppd.RPC_Client.__init__
spade.xmppd.xmppd.Server.__init__
spade.xmppd.xmppd.Session.__init__
spade.xmppd.xmppd.Session_Dummy.Stream.__init__
spade.xmppd.xmppd.Session_Dummy.__init__
spade.xmppd.xmppd.Socker_client.__init__
spade.xmppd.xmppd.fake_select.__init__
spade.xmppd.xmppd.fake_select.poll.__init__
spade.xmppd.xmppd.get_input.__init__
spade.xmppd.xmppd.localizer.__init__
spade.xmppd.xmppd.multisession_manager.__init__
spade.xmppd.xmppd.multisession_manager.multisession_thread.__init__" class="py-name" href="#" onclick="return doclink('link-38', '__init__', 'link-38');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-39" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-39', 'P', 'link-13');">P</a></tt> <tt class="py-op">=</tt> <tt id="link-40" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-40', 'P', 'link-13');">P</a></tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-41" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-41', 'Q', 'link-15');">Q</a></tt> <tt class="py-op">=</tt> <tt id="link-42" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-42', 'Q', 'link-15');">Q</a></tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inputs</tt>  <tt class="py-op">=</tt> <tt class="py-name">inputs</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">outputs</tt> <tt class="py-op">=</tt> <tt class="py-name">outputs</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">QoS</tt> <tt class="py-op">=</tt> <tt class="py-name">QoS</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-43" class="py-name" targets="Method spade.Platform.SpadePlatform.services()=spade.Platform.SpadePlatform-class.html#services"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-43', 'services', 'link-43');">services</a></tt> <tt class="py-op">=</tt> <tt id="link-44" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-44', 'services', 'link-43');">services</a></tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">time</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-45" class="py-name" targets="Variable spade.xmpp.browser.ID=spade.xmpp.browser-module.html#ID,Variable spade.xmpp.dispatcher.ID=spade.xmpp.dispatcher-module.html#ID"><a title="spade.xmpp.browser.ID
spade.xmpp.dispatcher.ID" class="py-name" href="#" onclick="return doclink('link-45', 'ID', 'link-45');">ID</a></tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-46" class="py-name"><a title="spade.xmpp.browser.ID
spade.xmpp.dispatcher.ID" class="py-name" href="#" onclick="return doclink('link-46', 'ID', 'link-45');">ID</a></tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">uuid4</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-47" class="py-name"><a title="spade.xmpp.browser.ID
spade.xmpp.dispatcher.ID" class="py-name" href="#" onclick="return doclink('link-47', 'ID', 'link-45');">ID</a></tt> <tt class="py-op">=</tt> <tt id="link-48" class="py-name"><a title="spade.xmpp.browser.ID
spade.xmpp.dispatcher.ID" class="py-name" href="#" onclick="return doclink('link-48', 'ID', 'link-45');">ID</a></tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">         </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">rewards</tt>    <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">punishments</tt><tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">executions</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">trust</tt>      <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
</div><a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">         </tt>
<a name="Case.getID"></a><div id="Case.getID-def"><a name="L62"></a><tt class="py-lineno"> 62</tt> <a class="py-toggle" href="#" id="Case.getID-toggle" onclick="return toggle('Case.getID');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Case-class.html#getID">getID</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-49" class="py-name"><a title="spade.xmpp.browser.ID
spade.xmpp.dispatcher.ID" class="py-name" href="#" onclick="return doclink('link-49', 'ID', 'link-45');">ID</a></tt> </tt>
</div><a name="Case.getP"></a><div id="Case.getP-def"><a name="L63"></a><tt class="py-lineno"> 63</tt> <a class="py-toggle" href="#" id="Case.getP-toggle" onclick="return toggle('Case.getP');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Case-class.html#getP">getP</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-50" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-50', 'P', 'link-13');">P</a></tt> </tt>
</div><a name="Case.getQ"></a><div id="Case.getQ-def"><a name="L64"></a><tt class="py-lineno"> 64</tt> <a class="py-toggle" href="#" id="Case.getQ-toggle" onclick="return toggle('Case.getQ');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Case-class.html#getQ">getQ</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-51" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-51', 'Q', 'link-15');">Q</a></tt> </tt>
</div><a name="Case.getInputs"></a><div id="Case.getInputs-def"><a name="L65"></a><tt class="py-lineno"> 65</tt> <a class="py-toggle" href="#" id="Case.getInputs-toggle" onclick="return toggle('Case.getInputs');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Case-class.html#getInputs">getInputs</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inputs</tt> </tt>
</div><a name="Case.getOutputs"></a><div id="Case.getOutputs-def"><a name="L66"></a><tt class="py-lineno"> 66</tt> <a class="py-toggle" href="#" id="Case.getOutputs-toggle" onclick="return toggle('Case.getOutputs');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Case-class.html#getOutputs">getOutputs</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">outputs</tt> </tt>
</div><a name="Case.getQoS"></a><div id="Case.getQoS-def"><a name="L67"></a><tt class="py-lineno"> 67</tt> <a class="py-toggle" href="#" id="Case.getQoS-toggle" onclick="return toggle('Case.getQoS');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Case-class.html#getQoS">getQoS</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">QoS</tt> </tt>
</div><a name="Case.getTime"></a><div id="Case.getTime-def"><a name="L68"></a><tt class="py-lineno"> 68</tt> <a class="py-toggle" href="#" id="Case.getTime-toggle" onclick="return toggle('Case.getTime');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Case-class.html#getTime">getTime</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">time</tt> </tt>
</div><a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">     </tt>
<a name="Case.reward"></a><div id="Case.reward-def"><a name="L70"></a><tt class="py-lineno"> 70</tt> <a class="py-toggle" href="#" id="Case.reward-toggle" onclick="return toggle('Case.reward');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Case-class.html#reward">reward</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Case.reward-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Case.reward-expanded"><a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">rewards</tt><tt class="py-op">+=</tt><tt class="py-number">1</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">executions</tt><tt class="py-op">+=</tt><tt class="py-number">1</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">trust</tt> <tt class="py-op">=</tt> <tt class="py-name">min</tt><tt class="py-op">(</tt><tt class="py-number">1.0</tt><tt class="py-op">,</tt><tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">rewards</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">executions</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">QoS</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">trust</tt> </tt>
</div><a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">         </tt>
<a name="Case.punish"></a><div id="Case.punish-def"><a name="L76"></a><tt class="py-lineno"> 76</tt> <a class="py-toggle" href="#" id="Case.punish-toggle" onclick="return toggle('Case.punish');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Case-class.html#punish">punish</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Case.punish-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Case.punish-expanded"><a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">rewards</tt><tt class="py-op">&gt;</tt><tt class="py-number">0</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">rewards</tt><tt class="py-op">-=</tt><tt class="py-number">1</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">punishments</tt><tt class="py-op">+=</tt><tt class="py-number">1</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">executions</tt><tt class="py-op">+=</tt><tt class="py-number">1</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">trust</tt> <tt class="py-op">=</tt> <tt class="py-name">max</tt><tt class="py-op">(</tt><tt class="py-number">0.0</tt><tt class="py-op">,</tt><tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">rewards</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">executions</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">QoS</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">trust</tt> </tt>
</div><a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">         </tt>
<a name="Case.__add__"></a><div id="Case.__add__-def"><a name="L83"></a><tt class="py-lineno"> 83</tt> <a class="py-toggle" href="#" id="Case.__add__-toggle" onclick="return toggle('Case.__add__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Case-class.html#__add__">__add__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">y</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Case.__add__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Case.__add__-expanded"><a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">        <tt class="py-comment">#if str(self.Q)!=str(y.getP()):</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">sentence</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">outputs</tt><tt class="py-op">:</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">sentence</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt id="link-52" class="py-name" targets="Variable spade.Agent.y=spade.Agent-module.html#y,Variable spade.bdi.y=spade.bdi-module.html#y,Variable spade.logic.y=spade.logic-module.html#y"><a title="spade.Agent.y
spade.bdi.y
spade.logic.y" class="py-name" href="#" onclick="return doclink('link-52', 'y', 'link-52');">y</a></tt><tt class="py-op">.</tt><tt class="py-name">inputs</tt><tt class="py-op">:</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-53" class="py-name" targets="Class spade.tbcbp.Case=spade.tbcbp.Case-class.html"><a title="spade.tbcbp.Case" class="py-name" href="#" onclick="return doclink('link-53', 'Case', 'link-53');">Case</a></tt><tt class="py-op">(</tt><tt id="link-54" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-54', 'P', 'link-13');">P</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-55" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-55', 'P', 'link-13');">P</a></tt><tt class="py-op">,</tt><tt id="link-56" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-56', 'Q', 'link-15');">Q</a></tt><tt class="py-op">=</tt><tt id="link-57" class="py-name"><a title="spade.Agent.y
spade.bdi.y
spade.logic.y" class="py-name" href="#" onclick="return doclink('link-57', 'y', 'link-52');">y</a></tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="spade.DF.Service.getQ
spade.tbcbp.Case.getQ
spade.tbcbp.Plan.getQ" class="py-name" href="#" onclick="return doclink('link-58', 'getQ', 'link-16');">getQ</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">inputs</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-59" class="py-name"><a title="spade.DF.Service.getInputs
spade.tbcbp.Case.getInputs
spade.tbcbp.Plan.getInputs" class="py-name" href="#" onclick="return doclink('link-59', 'getInputs', 'link-17');">getInputs</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">outputs</tt><tt class="py-op">=</tt><tt id="link-60" class="py-name"><a title="spade.Agent.y
spade.bdi.y
spade.logic.y" class="py-name" href="#" onclick="return doclink('link-60', 'y', 'link-52');">y</a></tt><tt class="py-op">.</tt><tt id="link-61" class="py-name"><a title="spade.DF.Service.getOutputs
spade.tbcbp.Case.getOutputs
spade.tbcbp.Plan.getOutputs" class="py-name" href="#" onclick="return doclink('link-61', 'getOutputs', 'link-18');">getOutputs</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-62" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-62', 'services', 'link-43');">services</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-63" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-63', 'services', 'link-43');">services</a></tt><tt class="py-op">+</tt><tt id="link-64" class="py-name"><a title="spade.Agent.y
spade.bdi.y
spade.logic.y" class="py-name" href="#" onclick="return doclink('link-64', 'y', 'link-52');">y</a></tt><tt class="py-op">.</tt><tt id="link-65" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-65', 'services', 'link-43');">services</a></tt><tt class="py-op">,</tt><tt class="py-name">QoS</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">QoS</tt><tt class="py-op">*</tt><tt id="link-66" class="py-name"><a title="spade.Agent.y
spade.bdi.y
spade.logic.y" class="py-name" href="#" onclick="return doclink('link-66', 'y', 'link-52');">y</a></tt><tt class="py-op">.</tt><tt class="py-name">QoS</tt><tt class="py-op">,</tt> <tt id="link-67" class="py-name"><a title="spade.xmpp.browser.ID
spade.xmpp.dispatcher.ID" class="py-name" href="#" onclick="return doclink('link-67', 'ID', 'link-45');">ID</a></tt><tt class="py-op">=</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">uuid4</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line"> </tt>
<a name="Case.__iadd__"></a><div id="Case.__iadd__-def"><a name="L90"></a><tt class="py-lineno"> 90</tt> <a class="py-toggle" href="#" id="Case.__iadd__-toggle" onclick="return toggle('Case.__iadd__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Case-class.html#__iadd__">__iadd__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">y</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Case.__iadd__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Case.__iadd__-expanded"><a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">        <tt class="py-name">self</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">+</tt><tt id="link-68" class="py-name"><a title="spade.Agent.y
spade.bdi.y
spade.logic.y" class="py-name" href="#" onclick="return doclink('link-68', 'y', 'link-52');">y</a></tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">         </tt>
<a name="Case.__eq__"></a><div id="Case.__eq__-def"><a name="L94"></a><tt class="py-lineno"> 94</tt> <a class="py-toggle" href="#" id="Case.__eq__-toggle" onclick="return toggle('Case.__eq__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Case-class.html#__eq__">__eq__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">y</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Case.__eq__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Case.__eq__-expanded"><a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">issubclass</tt><tt class="py-op">(</tt><tt id="link-69" class="py-name"><a title="spade.Agent.y
spade.bdi.y
spade.logic.y" class="py-name" href="#" onclick="return doclink('link-69', 'y', 'link-52');">y</a></tt><tt class="py-op">.</tt><tt class="py-name">__class__</tt><tt class="py-op">,</tt><tt id="link-70" class="py-name"><a title="spade.tbcbp.Case" class="py-name" href="#" onclick="return doclink('link-70', 'Case', 'link-53');">Case</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-71" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-71', 'services', 'link-43');">services</a></tt><tt class="py-op">!=</tt> <tt id="link-72" class="py-name"><a title="spade.Agent.y
spade.bdi.y
spade.logic.y" class="py-name" href="#" onclick="return doclink('link-72', 'y', 'link-52');">y</a></tt><tt class="py-op">.</tt><tt id="link-73" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-73', 'services', 'link-43');">services</a></tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">        <tt class="py-comment">#if self.P!=y.getP():</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-74" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-74', 'P', 'link-13');">P</a></tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt id="link-75" class="py-name"><a title="spade.Agent.y
spade.bdi.y
spade.logic.y" class="py-name" href="#" onclick="return doclink('link-75', 'y', 'link-52');">y</a></tt><tt class="py-op">.</tt><tt id="link-76" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-76', 'P', 'link-13');">P</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">        <tt class="py-comment">#if self.Q!=y.getQ():</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-77" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-77', 'Q', 'link-15');">Q</a></tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt id="link-78" class="py-name"><a title="spade.Agent.y
spade.bdi.y
spade.logic.y" class="py-name" href="#" onclick="return doclink('link-78', 'y', 'link-52');">y</a></tt><tt class="py-op">.</tt><tt id="link-79" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-79', 'Q', 'link-15');">Q</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inputs</tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt id="link-80" class="py-name"><a title="spade.Agent.y
spade.bdi.y
spade.logic.y" class="py-name" href="#" onclick="return doclink('link-80', 'y', 'link-52');">y</a></tt><tt class="py-op">.</tt><tt class="py-name">inputs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">outputs</tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt id="link-81" class="py-name"><a title="spade.Agent.y
spade.bdi.y
spade.logic.y" class="py-name" href="#" onclick="return doclink('link-81', 'y', 'link-52');">y</a></tt><tt class="py-op">.</tt><tt class="py-name">outputs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">         </tt>
<a name="Case.__ne__"></a><div id="Case.__ne__-def"><a name="L109"></a><tt class="py-lineno">109</tt> <a class="py-toggle" href="#" id="Case.__ne__-toggle" onclick="return toggle('Case.__ne__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Case-class.html#__ne__">__ne__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">y</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Case.__ne__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Case.__ne__-expanded"><a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">==</tt><tt id="link-82" class="py-name"><a title="spade.Agent.y
spade.bdi.y
spade.logic.y" class="py-name" href="#" onclick="return doclink('link-82', 'y', 'link-52');">y</a></tt> </tt>
</div><a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">     </tt>
<a name="Case.__str__"></a><div id="Case.__str__-def"><a name="L112"></a><tt class="py-lineno">112</tt> <a class="py-toggle" href="#" id="Case.__str__-toggle" onclick="return toggle('Case.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Case-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Case.__str__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Case.__str__-expanded"><a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">"{ID: "</tt><tt class="py-op">+</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-83" class="py-name"><a title="spade.xmpp.browser.ID
spade.xmpp.dispatcher.ID" class="py-name" href="#" onclick="return doclink('link-83', 'ID', 'link-45');">ID</a></tt><tt class="py-op">+</tt><tt class="py-string">" P: "</tt><tt class="py-op">+</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-84" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-84', 'P', 'link-13');">P</a></tt><tt class="py-op">)</tt><tt class="py-op">+</tt> <tt class="py-string">" Q: "</tt><tt class="py-op">+</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-85" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-85', 'Q', 'link-15');">Q</a></tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-string">" I: "</tt><tt class="py-op">+</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inputs</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-string">" O: "</tt><tt class="py-op">+</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">outputs</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-string">" SERVICES:"</tt><tt class="py-op">+</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-86" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-86', 'services', 'link-43');">services</a></tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-string">" QoS: "</tt><tt class="py-op">+</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">QoS</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-string">"}"</tt> </tt>
</div><a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line"> </tt>
<a name="Case.__repr__"></a><div id="Case.__repr__-def"><a name="L115"></a><tt class="py-lineno">115</tt> <a class="py-toggle" href="#" id="Case.__repr__-toggle" onclick="return toggle('Case.__repr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Case-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Case.__repr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Case.__repr__-expanded"><a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-87" class="py-name" targets="Method spade.ACLMessage.ACLMessage.__str__()=spade.ACLMessage.ACLMessage-class.html#__str__,Method spade.AID.aid.__str__()=spade.AID.aid-class.html#__str__,Method spade.AMS.AmsAgentDescription.__str__()=spade.AMS.AmsAgentDescription-class.html#__str__,Method spade.BasicFipaDateTime.BasicFipaDateTime.__str__()=spade.BasicFipaDateTime.BasicFipaDateTime-class.html#__str__,Method spade.Behaviour.ACLTemplate.__str__()=spade.Behaviour.ACLTemplate-class.html#__str__,Method spade.DF.DfAgentDescription.__str__()=spade.DF.DfAgentDescription-class.html#__str__,Method spade.DF.Service.__str__()=spade.DF.Service-class.html#__str__,Method spade.DF.ServiceDescription.__str__()=spade.DF.ServiceDescription-class.html#__str__,Method spade.Envelope.Envelope.__str__()=spade.Envelope.Envelope-class.html#__str__,Method spade.Platform.PlatformRestart.__str__()=spade.Platform.PlatformRestart-class.html#__str__,Method spade.bdi.Goal.__str__()=spade.bdi.Goal-class.html#__str__,Method spade.content.ContentObject.__str__()=spade.content.ContentObject-class.html#__str__,Method spade.kb.KBConfigurationFailed.__str__()=spade.kb.KBConfigurationFailed-class.html#__str__,Method spade.pyparsing.And.__str__()=spade.pyparsing.And-class.html#__str__,Method spade.pyparsing.CharsNotIn.__str__()=spade.pyparsing.CharsNotIn-class.html#__str__,Method spade.pyparsing.Each.__str__()=spade.pyparsing.Each-class.html#__str__,Method spade.pyparsing.Forward.__str__()=spade.pyparsing.Forward-class.html#__str__,Method spade.pyparsing.MatchFirst.__str__()=spade.pyparsing.MatchFirst-class.html#__str__,Method spade.pyparsing.NotAny.__str__()=spade.pyparsing.NotAny-class.html#__str__,Method spade.pyparsing.OneOrMore.__str__()=spade.pyparsing.OneOrMore-class.html#__str__,Method spade.pyparsing.Optional.__str__()=spade.pyparsing.Optional-class.html#__str__,Method spade.pyparsing.Or.__str__()=spade.pyparsing.Or-class.html#__str__,Method spade.pyparsing.ParseBaseException.__str__()=spade.pyparsing.ParseBaseException-class.html#__str__,Method spade.pyparsing.ParseElementEnhance.__str__()=spade.pyparsing.ParseElementEnhance-class.html#__str__,Method spade.pyparsing.ParseExpression.__str__()=spade.pyparsing.ParseExpression-class.html#__str__,Method spade.pyparsing.ParseResults.__str__()=spade.pyparsing.ParseResults-class.html#__str__,Method spade.pyparsing.ParserElement.__str__()=spade.pyparsing.ParserElement-class.html#__str__,Method spade.pyparsing.RecursiveGrammarException.__str__()=spade.pyparsing.RecursiveGrammarException-class.html#__str__,Method spade.pyparsing.Word.__str__()=spade.pyparsing.Word-class.html#__str__,Method spade.pyparsing.ZeroOrMore.__str__()=spade.pyparsing.ZeroOrMore-class.html#__str__,Method spade.pyparsing._ForwardNoRecurse.__str__()=spade.pyparsing._ForwardNoRecurse-class.html#__str__,Method spade.pyratemp.TemplateBase.__str__()=spade.pyratemp.TemplateBase-class.html#__str__,Method spade.pyratemp.TemplateParseError.__str__()=spade.pyratemp.TemplateParseError-class.html#__str__,Method spade.tbcbp.Case.__str__()=spade.tbcbp.Case-class.html#__str__,Method spade.tbcbp.Plan.__str__()=spade.tbcbp.Plan-class.html#__str__,Method spade.xmpp.protocol.JID.__str__()=spade.xmpp.protocol.JID-class.html#__str__,Method spade.xmpp.simplexml.Node.__str__()=spade.xmpp.simplexml.Node-class.html#__str__,Method spade.xmpp.transports.error.__str__()=spade.xmpp.transports.error-class.html#__str__,Method spade.xmppd.modules.db_fake.DB.__str__()=spade.xmppd.modules.db_fake.DB-class.html#__str__,Method spade.xmppd.modules.muc.Participant.__str__()=spade.xmppd.modules.muc.Participant-class.html#__str__,Method spade.xmppd.modules.muc.Room.__str__()=spade.xmppd.modules.muc.Room-class.html#__str__,Method spade.xmppd.modules.pubsub.PSNode.__str__()=spade.xmppd.modules.pubsub.PSNode-class.html#__str__"><a title="spade.ACLMessage.ACLMessage.__str__
spade.AID.aid.__str__
spade.AMS.AmsAgentDescription.__str__
spade.BasicFipaDateTime.BasicFipaDateTime.__str__
spade.Behaviour.ACLTemplate.__str__
spade.DF.DfAgentDescription.__str__
spade.DF.Service.__str__
spade.DF.ServiceDescription.__str__
spade.Envelope.Envelope.__str__
spade.Platform.PlatformRestart.__str__
spade.bdi.Goal.__str__
spade.content.ContentObject.__str__
spade.kb.KBConfigurationFailed.__str__
spade.pyparsing.And.__str__
spade.pyparsing.CharsNotIn.__str__
spade.pyparsing.Each.__str__
spade.pyparsing.Forward.__str__
spade.pyparsing.MatchFirst.__str__
spade.pyparsing.NotAny.__str__
spade.pyparsing.OneOrMore.__str__
spade.pyparsing.Optional.__str__
spade.pyparsing.Or.__str__
spade.pyparsing.ParseBaseException.__str__
spade.pyparsing.ParseElementEnhance.__str__
spade.pyparsing.ParseExpression.__str__
spade.pyparsing.ParseResults.__str__
spade.pyparsing.ParserElement.__str__
spade.pyparsing.RecursiveGrammarException.__str__
spade.pyparsing.Word.__str__
spade.pyparsing.ZeroOrMore.__str__
spade.pyparsing._ForwardNoRecurse.__str__
spade.pyratemp.TemplateBase.__str__
spade.pyratemp.TemplateParseError.__str__
spade.tbcbp.Case.__str__
spade.tbcbp.Plan.__str__
spade.xmpp.protocol.JID.__str__
spade.xmpp.simplexml.Node.__str__
spade.xmpp.transports.error.__str__
spade.xmppd.modules.db_fake.DB.__str__
spade.xmppd.modules.muc.Participant.__str__
spade.xmppd.modules.muc.Room.__str__
spade.xmppd.modules.pubsub.PSNode.__str__" class="py-name" href="#" onclick="return doclink('link-87', '__str__', 'link-87');">__str__</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">     </tt>
<a name="Case.__len__"></a><div id="Case.__len__-def"><a name="L118"></a><tt class="py-lineno">118</tt> <a class="py-toggle" href="#" id="Case.__len__-toggle" onclick="return toggle('Case.__len__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Case-class.html#__len__">__len__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Case.__len__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Case.__len__-expanded"><a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-88" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-88', 'services', 'link-43');">services</a></tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line"> </tt>
<a name="Plan"></a><div id="Plan-def"><a name="L121"></a><tt class="py-lineno">121</tt> <a class="py-toggle" href="#" id="Plan-toggle" onclick="return toggle('Plan');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="spade.tbcbp.Plan-class.html">Plan</a><tt class="py-op">(</tt><tt class="py-base-class">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Plan-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Plan-expanded"><a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">     </tt>
<a name="Plan.__init__"></a><div id="Plan.__init__-def"><a name="L123"></a><tt class="py-lineno">123</tt> <a class="py-toggle" href="#" id="Plan.__init__-toggle" onclick="return toggle('Plan.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Plan-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">cases</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Plan.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Plan.__init__-expanded"><a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line"><tt class="py-docstring">        Creates a new plan composed of a list of cases</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line"><tt class="py-docstring">        Usage:</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line"><tt class="py-docstring">        cases: a list of cases with at least 1 case</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">        <tt class="py-name">dict</tt><tt class="py-op">.</tt><tt id="link-89" class="py-name"><a title="spade.ACLMessage.ACLMessage.__init__
spade.ACLParser.ACLParser.__init__
spade.ACLParser.ACLxmlParser.__init__
spade.AID.aid.__init__
spade.AMS.AMS.DefaultBehaviour.__init__
spade.AMS.AMS.ModifyBehaviour.__init__
spade.AMS.AMS.PlatformBehaviour.__init__
spade.AMS.AMS.RegisterBehaviour.__init__
spade.AMS.AMS.SearchBehaviour.__init__
spade.AMS.AMS.__init__
spade.AMS.AmsAgentDescription.__init__
spade.Agent.AbstractAgent.__init__
spade.Agent.Agent.__init__
spade.Agent.PlatformAgent.__init__
spade.Agent.jabberProcess.__init__
spade.BasicFipaDateTime.BasicFipaDateTime.__init__
spade.Behaviour.ACLTemplate.__init__
spade.Behaviour.ANDTemplate.__init__
spade.Behaviour.Behaviour.__init__
spade.Behaviour.BehaviourTemplate.__init__
spade.Behaviour.EventBehaviour.__init__
spade.Behaviour.FSMBehaviour.__init__
spade.Behaviour.MessageTemplate.__init__
spade.Behaviour.NOTTemplate.__init__
spade.Behaviour.ORTemplate.__init__
spade.Behaviour.OneShotBehaviour.__init__
spade.Behaviour.PeriodicBehaviour.__init__
spade.Behaviour.TimeOutBehaviour.__init__
spade.Behaviour.XORTemplate.__init__
spade.DF.DF.DefaultBehaviour.__init__
spade.DF.DF.ModifyBehaviour.__init__
spade.DF.DF.RegisterBehaviour.__init__
spade.DF.DF.SearchBehaviour.__init__
spade.DF.DF.__init__
spade.DF.DfAgentDescription.__init__
spade.DF.Service.__init__
spade.DF.ServiceDescription.__init__
spade.ECLiPSeKB.ECLiPSeKB.__init__
spade.Envelope.Envelope.__init__
spade.FIPAMessage.FipaMessage.__init__
spade.Flora2KB.Flora2KB.__init__
spade.MTP.MTP.__init__
spade.MessageReceiver.MessageReceiver.__init__
spade.Organization.BanedUser.__init__
spade.Organization.CreationError.__init__
spade.Organization.DestroyError.__init__
spade.Organization.JoinError.__init__
spade.Organization.LastOwner.__init__
spade.Organization.LockedOrganization.__init__
spade.Organization.MaximumUsers.__init__
spade.Organization.MemberOfFederation.__init__
spade.Organization.MembersOnly.__init__
spade.Organization.NickNameConflict.__init__
spade.Organization.NotOwner.__init__
spade.Organization.NotSupervisor.__init__
spade.Organization.NotValidGoal.__init__
spade.Organization.NotValidName.__init__
spade.Organization.NotValidType.__init__
spade.Organization.NotValidUnit.__init__
spade.Organization.Organization.CreateRoomBehaviour.__init__
spade.Organization.Organization.CreateTeamBehaviour.__init__
spade.Organization.Organization.DestroyBehaviour.__init__
spade.Organization.Organization.GetRegistrationFormBehaviour.__init__
spade.Organization.Organization.GetUnitInfoBehaviour.__init__
spade.Organization.Organization.GetUnitListBehaviour.__init__
spade.Organization.Organization.IsMemberBehaviour.__init__
spade.Organization.Organization.MyJoinRoomBehaviour.__init__
spade.Organization.Organization.SendRegistrationFormBehaviour.__init__
spade.Organization.Organization.TestRoomNameBehaviour.__init__
spade.Organization.Organization.__init__
spade.Organization.PaswordNeeded.__init__
spade.Organization.Unavailable.__init__
spade.Organization.UnavailableFunction.__init__
spade.Organization_new.BanedUser.__init__
spade.Organization_new.CreationError.__init__
spade.Organization_new.DestroyError.__init__
spade.Organization_new.JoinError.__init__
spade.Organization_new.LastOwner.__init__
spade.Organization_new.LockedOrganization.__init__
spade.Organization_new.MaximumUsers.__init__
spade.Organization_new.MemberOfFederation.__init__
spade.Organization_new.MembersOnly.__init__
spade.Organization_new.NickNameConflict.__init__
spade.Organization_new.NotCreatePermision.__init__
spade.Organization_new.NotSupervisor.__init__
spade.Organization_new.NotValidGoal.__init__
spade.Organization_new.NotValidName.__init__
spade.Organization_new.NotValidType.__init__
spade.Organization_new.NotValidUnit.__init__
spade.Organization_new.Organization_new.CreateRoomBehaviour.__init__
spade.Organization_new.Organization_new.CreateTeamBehaviour.__init__
spade.Organization_new.Organization_new.DestroyBehaviour.__init__
spade.Organization_new.Organization_new.GetRegistrationFormBehaviour.__init__
spade.Organization_new.Organization_new.GetUnitInfoBehaviour.__init__
spade.Organization_new.Organization_new.GetUnitListBehaviour.__init__
spade.Organization_new.Organization_new.IsMemberBehaviour.__init__
spade.Organization_new.Organization_new.MyJoinRoomBehaviour.__init__
spade.Organization_new.Organization_new.SendRegistrationFormBehaviour.__init__
spade.Organization_new.Organization_new.TestRoomNameBehaviour.__init__
spade.Organization_new.Organization_new.__init__
spade.Organization_new.PaswordNeeded.__init__
spade.Organization_new.Unavailable.__init__
spade.Organization_new.UnavailableFunction.__init__
spade.Platform.PlatformRestart.__init__
spade.Platform.SpadePlatform.RouteBehaviour.__init__
spade.Platform.SpadePlatform.__init__
spade.RDF0Parser.RDF0Parser.__init__
spade.RPC.RPCClientBehaviour.__init__
spade.ReceivedObject.ReceivedObject.__init__
spade.SIMBA.SIMBA.OutboxBehaviour.__init__
spade.SIMBA.SIMBA.__init__
spade.SL0Parser.SL0Parser.__init__
spade.SPARQLKB.SPARQLKB.__init__
spade.SWIKB.SWIKB.__init__
spade.SpadeConfigParser.ConfigParser.__init__
spade.SpadeConfigParser.spadeXML.__init__
spade.SpadeConfigParser.spadeXMLHandler.__init__
spade.Unit.BanedUser.__init__
spade.Unit.CreationError.__init__
spade.Unit.DestroyError.__init__
spade.Unit.JoinError.__init__
spade.Unit.LastOwner.__init__
spade.Unit.LockedUnit.__init__
spade.Unit.MaximumUsers.__init__
spade.Unit.MembersOnly.__init__
spade.Unit.NickNameConflict.__init__
spade.Unit.NotAdmin.__init__
spade.Unit.NotSupervisor.__init__
spade.Unit.NotValidGoal.__init__
spade.Unit.NotValidGoalChange.__init__
spade.Unit.NotValidName.__init__
spade.Unit.NotValidType.__init__
spade.Unit.NotValidUnit.__init__
spade.Unit.PaswordNeeded.__init__
spade.Unit.Unavailable.__init__
spade.Unit.Unit.AddAdminBehaviour.__init__
spade.Unit.Unit.AddBanAgentBehaviour.__init__
spade.Unit.Unit.AddModeratorBehaviour.__init__
spade.Unit.Unit.AddOwnerBehaviour.__init__
spade.Unit.Unit.CreateRoomBehaviour.__init__
spade.Unit.Unit.DestroyBehaviour.__init__
spade.Unit.Unit.GetAdminListBehaviour.__init__
spade.Unit.Unit.GetBanAgentListBehaviour.__init__
spade.Unit.Unit.GetGoalBehaviour.__init__
spade.Unit.Unit.GetInfoBehaviour.__init__
spade.Unit.Unit.GetMaxAgentsBehaviour.__init__
spade.Unit.Unit.GetMemberListBehaviour.__init__
spade.Unit.Unit.GetMinAgentsBehaviour.__init__
spade.Unit.Unit.GetModeratorListBehaviour.__init__
spade.Unit.Unit.GetNumberOfAgentsBehaviour.__init__
spade.Unit.Unit.GetOwnerListBehaviour.__init__
spade.Unit.Unit.GiveVoiceBehaviour.__init__
spade.Unit.Unit.KickAgentBehaviour.__init__
spade.Unit.Unit.MyJoinRoomBehaviour.__init__
spade.Unit.Unit.PresenceBehaviour.MinAgentsBehaviour.__init__
spade.Unit.Unit.PresenceBehaviour.__init__
spade.Unit.Unit.RemoveAdminBehaviour.__init__
spade.Unit.Unit.RemoveBanAgentBehaviour.__init__
spade.Unit.Unit.RemoveModeratorBehaviour.__init__
spade.Unit.Unit.RemoveOwnerBehaviour.__init__
spade.Unit.Unit.RevokeVoiceBehaviour.__init__
spade.Unit.Unit.SendMessageBehaviour.__init__
spade.Unit.Unit.SendPrivateMessageBehaviour.__init__
spade.Unit.Unit.SetGoalBehaviour.__init__
spade.Unit.Unit.SetMaxAgentsBehaviour.__init__
spade.Unit.Unit.SetMinAgentsBehaviour.__init__
spade.Unit.Unit.TestRoomNameBehaviour.__init__
spade.Unit.Unit.__init__
spade.Unit_new.BanedUser.__init__
spade.Unit_new.CreationError.__init__
spade.Unit_new.DestroyError.__init__
spade.Unit_new.JoinError.__init__
spade.Unit_new.LastOwner.__init__
spade.Unit_new.LockedUnit.__init__
spade.Unit_new.MaximumUsers.__init__
spade.Unit_new.MembersOnly.__init__
spade.Unit_new.NickNameConflict.__init__
spade.Unit_new.NotCreatePermision.__init__
spade.Unit_new.NotSupervisor.__init__
spade.Unit_new.NotValidGoal.__init__
spade.Unit_new.NotValidGoalChange.__init__
spade.Unit_new.NotValidName.__init__
spade.Unit_new.NotValidType.__init__
spade.Unit_new.NotValidUnit.__init__
spade.Unit_new.PaswordNeeded.__init__
spade.Unit_new.Unavailable.__init__
spade.Unit_new.Unit_new.AddAdminBehaviour.__init__
spade.Unit_new.Unit_new.AddBanAgentBehaviour.__init__
spade.Unit_new.Unit_new.AddModeratorBehaviour.__init__
spade.Unit_new.Unit_new.CreateRoomBehaviour.__init__
spade.Unit_new.Unit_new.DestroyBehaviour.__init__
spade.Unit_new.Unit_new.GetAdminListBehaviour.__init__
spade.Unit_new.Unit_new.GetBanAgentListBehaviour.__init__
spade.Unit_new.Unit_new.GetGoalBehaviour.__init__
spade.Unit_new.Unit_new.GetInfoBehaviour.__init__
spade.Unit_new.Unit_new.GetMaxAgentsBehaviour.__init__
spade.Unit_new.Unit_new.GetMemberListBehaviour.__init__
spade.Unit_new.Unit_new.GetMinAgentsBehaviour.__init__
spade.Unit_new.Unit_new.GetModeratorListBehaviour.__init__
spade.Unit_new.Unit_new.GetNumberOfAgentsBehaviour.__init__
spade.Unit_new.Unit_new.GetOwnerListBehaviour.__init__
spade.Unit_new.Unit_new.GiveVoiceBehaviour.__init__
spade.Unit_new.Unit_new.KickAgentBehaviour.__init__
spade.Unit_new.Unit_new.MyJoinRoomBehaviour.__init__
spade.Unit_new.Unit_new.PresenceBehaviour.MinAgentsBehaviour.__init__
spade.Unit_new.Unit_new.PresenceBehaviour.__init__
spade.Unit_new.Unit_new.RemoveAdminBehaviour.__init__
spade.Unit_new.Unit_new.RemoveBanAgentBehaviour.__init__
spade.Unit_new.Unit_new.RemoveModeratorBehaviour.__init__
spade.Unit_new.Unit_new.RevokeVoiceBehaviour.__init__
spade.Unit_new.Unit_new.SendMessageBehaviour.__init__
spade.Unit_new.Unit_new.SendPrivateMessageBehaviour.__init__
spade.Unit_new.Unit_new.SetGoalBehaviour.__init__
spade.Unit_new.Unit_new.SetMaxAgentsBehaviour.__init__
spade.Unit_new.Unit_new.SetMinAgentsBehaviour.__init__
spade.Unit_new.Unit_new.TestRoomNameBehaviour.__init__
spade.Unit_new.Unit_new.__init__
spade.XMLCodec.XMLCodec.__init__
spade.XSBKB.XSBKB.__init__
spade.bdi.BDIBehaviour.__init__
spade.bdi.Goal.__init__
spade.content.ContentObject.__init__
spade.dblite.Base.__init__
spade.dblite.Index.__init__
spade.fipa.ModifyAgentBehaviour.__init__
spade.fipa.SearchAgentBehaviour.__init__
spade.fipa.deregisterServiceBehaviour.__init__
spade.fipa.getPlatformInfoBehaviour.__init__
spade.fipa.modifyServiceBehaviour.__init__
spade.fipa.registerServiceBehaviour.__init__
spade.fipa.searchServiceBehaviour.__init__
spade.kb.KB.__init__
spade.kb.KBConfigurationFailed.__init__
spade.logic.Expr.__init__
spade.logic.FolKB.__init__
spade.logic.KB.__init__
spade.logic.PropKB.__init__
spade.odict.odict.__init__
spade.peer2peer.RequestDiscoInfoBehav.__init__
spade.peer2peer.SendStreamInitiationBehav.__init__
spade.pubsub.PubSub.__init__
spade.pubsub.PubSub._sendAndReceiveBehav.__init__
spade.pygooglechart.Axis.__init__
spade.pygooglechart.BarChart.__init__
spade.pygooglechart.Chart.__init__
spade.pygooglechart.ChartGrammar.__init__
spade.pygooglechart.Data.__init__
spade.pygooglechart.GoogleOMeterChart.__init__
spade.pygooglechart.GroupedBarChart.__init__
spade.pygooglechart.LabelAxis.__init__
spade.pygooglechart.LineChart.__init__
spade.pygooglechart.MapChart.__init__
spade.pygooglechart.PieChart.__init__
spade.pygooglechart.QRChart.__init__
spade.pygooglechart.RangeAxis.__init__
spade.pyparsing.And.__init__
spade.pyparsing.CaselessLiteral.__init__
spade.pyparsing.CharsNotIn.__init__
spade.pyparsing.Combine.__init__
spade.pyparsing.Dict.__init__
spade.pyparsing.Each.__init__
spade.pyparsing.Empty.__init__
spade.pyparsing.FollowedBy.__init__
spade.pyparsing.Forward.__init__
spade.pyparsing.GoToColumn.__init__
spade.pyparsing.Group.__init__
spade.pyparsing.Keyword.__init__
spade.pyparsing.LineEnd.__init__
spade.pyparsing.LineStart.__init__
spade.pyparsing.Literal.__init__
spade.pyparsing.MatchFirst.__init__
spade.pyparsing.NoMatch.__init__
spade.pyparsing.NotAny.__init__
spade.pyparsing.Optional.__init__
spade.pyparsing.Or.__init__
spade.pyparsing.ParseBaseException.__init__
spade.pyparsing.ParseElementEnhance.__init__
spade.pyparsing.ParseExpression.__init__
spade.pyparsing.ParseResults.__init__
spade.pyparsing.ParserElement.__init__
spade.pyparsing.PositionToken.__init__
spade.pyparsing.RecursiveGrammarException.__init__
spade.pyparsing.SkipTo.__init__
spade.pyparsing.StringEnd.__init__
spade.pyparsing.StringStart.__init__
spade.pyparsing.Token.__init__
spade.pyparsing.TokenConverter.__init__
spade.pyparsing.Upcase.__init__
spade.pyparsing.White.__init__
spade.pyparsing.Word.__init__
spade.pyparsing.ZeroOrMore.__init__
spade.pyratemp.FileLoader.__init__
spade.pyratemp.Parser.__init__
spade.pyratemp.PseudoSandbox.__init__
spade.pyratemp.Renderer.__init__
spade.pyratemp.StringLoader.__init__
spade.pyratemp.Template.__init__
spade.pyratemp.TemplateBase.__init__
spade.pyratemp.TemplateEval.__init__
spade.pyratemp.TemplateParseError.__init__
spade.pyxf.eclipse.__init__
spade.pyxf.flora2.__init__
spade.pyxf.swipl.__init__
spade.pyxf.xsb.__init__
spade.socialnetwork.SocialItem.__init__
spade.spade_backend.SpadeBackend.__init__
spade.tbcbp.Case.__init__
spade.tbcbp.CaseDB.__init__
spade.tbcbp.Plan.__init__
spade.tbcbp.TBCBP.__init__
spade.wui.WUI.__init__
spade.xmpp.auth.Bind.__init__
spade.xmpp.auth.ComponentBind.__init__
spade.xmpp.auth.NonSASL.__init__
spade.xmpp.auth.SASL.__init__
spade.xmpp.browser.Browser.__init__
spade.xmpp.client.CommonClient.__init__
spade.xmpp.client.Component.__init__
spade.xmpp.client.PlugIn.__init__
spade.xmpp.commands.Command_Handler_Prototype.__init__
spade.xmpp.commands.Commands.__init__
spade.xmpp.commands.TestCommand.__init__
spade.xmpp.debug.Debug.__init__
spade.xmpp.debug.NoDebug.__init__
spade.xmpp.dispatcher.Dispatcher.__init__
spade.xmpp.filetransfer.IBB.__init__
spade.xmpp.protocol.DataField.__init__
spade.xmpp.protocol.DataForm.__init__
spade.xmpp.protocol.Error.__init__
spade.xmpp.protocol.ErrorNode.__init__
spade.xmpp.protocol.Iq.__init__
spade.xmpp.protocol.JID.__init__
spade.xmpp.protocol.Message.__init__
spade.xmpp.protocol.Presence.__init__
spade.xmpp.protocol.Protocol.__init__
spade.xmpp.roster.Roster.__init__
spade.xmpp.session.Session.__init__
spade.xmpp.simplexml.Node.__init__
spade.xmpp.simplexml.NodeBuilder.__init__
spade.xmpp.simplexml.T.__init__
spade.xmpp.transports.HTTPPROXYsocket.__init__
spade.xmpp.transports.TCPsocket.__init__
spade.xmpp.transports.error.__init__
spade.xmppd.modules.config.Config.__init__
spade.xmppd.modules.config.xmppdXML.__init__
spade.xmppd.modules.config.xmppdXMLHandler.__init__
spade.xmppd.modules.muc.BadPassword.__init__
spade.xmppd.modules.muc.Blacklisted.__init__
spade.xmppd.modules.muc.MaxUsers.__init__
spade.xmppd.modules.muc.NickLockedDown.__init__
spade.xmppd.modules.muc.NoVoice.__init__
spade.xmppd.modules.muc.NotAMember.__init__
spade.xmppd.modules.muc.Participant.__init__
spade.xmppd.modules.muc.Room.__init__
spade.xmppd.modules.muc.SerializableRoom.__init__
spade.xmppd.modules.pubsub.PSNode.__init__
spade.xmppd.modules.wq.Conflict.__init__
spade.xmppd.modules.wq.Group.__init__
spade.xmppd.modules.wq.ItemNotFound.__init__
spade.xmppd.xmppd.RPC_Client.__init__
spade.xmppd.xmppd.Server.__init__
spade.xmppd.xmppd.Session.__init__
spade.xmppd.xmppd.Session_Dummy.Stream.__init__
spade.xmppd.xmppd.Session_Dummy.__init__
spade.xmppd.xmppd.Socker_client.__init__
spade.xmppd.xmppd.fake_select.__init__
spade.xmppd.xmppd.fake_select.poll.__init__
spade.xmppd.xmppd.get_input.__init__
spade.xmppd.xmppd.localizer.__init__
spade.xmppd.xmppd.multisession_manager.__init__
spade.xmppd.xmppd.multisession_manager.multisession_thread.__init__" class="py-name" href="#" onclick="return doclink('link-89', '__init__', 'link-38');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line"> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">cases</tt><tt class="py-op">)</tt><tt class="py-op">!=</tt> <tt id="link-90" class="py-name"><a title="spade.bdi.Goal.types" class="py-name" href="#" onclick="return doclink('link-90', 'types', 'link-4');">types</a></tt><tt class="py-op">.</tt><tt class="py-name">ListType</tt><tt class="py-op">:</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">cases</tt><tt class="py-op">)</tt><tt class="py-op">&lt;=</tt><tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">Exception</tt><tt class="py-op">(</tt><tt class="py-string">"cases must have at least one case"</tt><tt class="py-op">)</tt> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line"> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-91" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-91', 'P', 'link-13');">P</a></tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-name">cases</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-92" class="py-name"><a title="spade.DF.Service.getP
spade.tbcbp.Case.getP
spade.tbcbp.Plan.getP" class="py-name" href="#" onclick="return doclink('link-92', 'getP', 'link-14');">getP</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-93" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-93', 'Q', 'link-15');">Q</a></tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-name">cases</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-94" class="py-name"><a title="spade.DF.Service.getQ
spade.tbcbp.Case.getQ
spade.tbcbp.Plan.getQ" class="py-name" href="#" onclick="return doclink('link-94', 'getQ', 'link-16');">getQ</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inputs</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-name">cases</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-95" class="py-name"><a title="spade.DF.Service.getInputs
spade.tbcbp.Case.getInputs
spade.tbcbp.Plan.getInputs" class="py-name" href="#" onclick="return doclink('link-95', 'getInputs', 'link-17');">getInputs</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">outputs</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-name">cases</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-96" class="py-name"><a title="spade.DF.Service.getOutputs
spade.tbcbp.Case.getOutputs
spade.tbcbp.Plan.getOutputs" class="py-name" href="#" onclick="return doclink('link-96', 'getOutputs', 'link-18');">getOutputs</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cases</tt><tt class="py-op">=</tt><tt class="py-name">cases</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line">         </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_case</tt>    <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_service</tt> <tt class="py-op">=</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt> </tt>
</div><a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">         </tt>
<a name="Plan.getP"></a><div id="Plan.getP-def"><a name="L145"></a><tt class="py-lineno">145</tt> <a class="py-toggle" href="#" id="Plan.getP-toggle" onclick="return toggle('Plan.getP');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Plan-class.html#getP">getP</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-97" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-97', 'P', 'link-13');">P</a></tt> </tt>
</div><a name="Plan.getQ"></a><div id="Plan.getQ-def"><a name="L146"></a><tt class="py-lineno">146</tt> <a class="py-toggle" href="#" id="Plan.getQ-toggle" onclick="return toggle('Plan.getQ');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Plan-class.html#getQ">getQ</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-98" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-98', 'Q', 'link-15');">Q</a></tt> </tt>
</div><a name="Plan.getInputs"></a><div id="Plan.getInputs-def"><a name="L147"></a><tt class="py-lineno">147</tt> <a class="py-toggle" href="#" id="Plan.getInputs-toggle" onclick="return toggle('Plan.getInputs');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Plan-class.html#getInputs">getInputs</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inputs</tt> </tt>
</div><a name="Plan.getOutputs"></a><div id="Plan.getOutputs-def"><a name="L148"></a><tt class="py-lineno">148</tt> <a class="py-toggle" href="#" id="Plan.getOutputs-toggle" onclick="return toggle('Plan.getOutputs');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Plan-class.html#getOutputs">getOutputs</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">outputs</tt> </tt>
</div><a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line">         </tt>
<a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line">    <tt class="py-string">'''def match(self,P=[],Q=[]):</tt> </tt>
<a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line"><tt class="py-string">        if (P!=[] and sorted(P)==sorted(self.P)) and (Q!=[] and sorted(Q)==sorted(self.Q)): return True</tt> </tt>
<a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line"><tt class="py-string">        elif (P==None and Q==self.Q): return True</tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line"><tt class="py-string">        elif (Q==None and P==self.P): return True</tt> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line"><tt class="py-string">        else: return False</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line"><tt class="py-string">    '''</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line"> </tt>
<a name="Plan.getActiveCase"></a><div id="Plan.getActiveCase-def"><a name="L157"></a><tt class="py-lineno">157</tt> <a class="py-toggle" href="#" id="Plan.getActiveCase-toggle" onclick="return toggle('Plan.getActiveCase');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Plan-class.html#getActiveCase">getActiveCase</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_case</tt> </tt>
</div><a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line">     </tt>
<a name="Plan.getNextService"></a><div id="Plan.getNextService-def"><a name="L159"></a><tt class="py-lineno">159</tt> <a class="py-toggle" href="#" id="Plan.getNextService-toggle" onclick="return toggle('Plan.getNextService');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Plan-class.html#getNextService">getNextService</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Plan.getNextService-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Plan.getNextService-expanded"><a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cases</tt><tt class="py-op">)</tt><tt class="py-op">&lt;=</tt><tt class="py-number">0</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line">         </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_service</tt><tt class="py-op">+=</tt><tt class="py-number">1</tt> </tt>
<a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_service</tt> <tt class="py-op">&lt;</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cases</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_case</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-99" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-99', 'services', 'link-43');">services</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cases</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_case</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-100" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-100', 'services', 'link-43');">services</a></tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_service</tt><tt class="py-op">]</tt> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_service</tt><tt class="py-op">=</tt><tt class="py-number">0</tt> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_case</tt><tt class="py-op">+=</tt><tt class="py-number">1</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_case</tt> <tt class="py-op">&gt;=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cases</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_case</tt><tt class="py-op">=</tt><tt class="py-number">0</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_service</tt><tt class="py-op">=</tt><tt class="py-op">-</tt><tt class="py-number">1</tt> </tt>
<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">deepcopy</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cases</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_case</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-101" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-101', 'services', 'link-43');">services</a></tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">active_service</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
</div><a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line">         </tt>
<a name="Plan.getCases"></a><div id="Plan.getCases-def"><a name="L174"></a><tt class="py-lineno">174</tt> <a class="py-toggle" href="#" id="Plan.getCases-toggle" onclick="return toggle('Plan.getCases');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Plan-class.html#getCases">getCases</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Plan.getCases-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Plan.getCases-expanded"><a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line">        <tt class="py-docstring">'''returns all the cases of the plan'''</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cases</tt> </tt>
</div><a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line">     </tt>
<a name="Plan.getCase"></a><div id="Plan.getCase-def"><a name="L178"></a><tt class="py-lineno">178</tt> <a class="py-toggle" href="#" id="Plan.getCase-toggle" onclick="return toggle('Plan.getCase');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Plan-class.html#getCase">getCase</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Plan.getCase-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Plan.getCase-expanded"><a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line"><tt class="py-docstring">        compose a new composite case by joining all the cases of the plan</tt> </tt>
<a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line"><tt class="py-docstring">        returns a Case</tt> </tt>
<a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cases</tt><tt class="py-op">)</tt><tt class="py-op">==</tt><tt class="py-number">0</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line">        <tt class="py-name">case</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cases</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-102" class="py-name" targets="Variable spade.ACLParser.c=spade.ACLParser-module.html#c,Variable spade.AMS.c=spade.AMS-module.html#c,Variable spade.DF.c=spade.DF-module.html#c,Variable spade.SL0Parser.c=spade.SL0Parser-module.html#c,Variable spade.pyparsing.c=spade.pyparsing-module.html#c"><a title="spade.ACLParser.c
spade.AMS.c
spade.DF.c
spade.SL0Parser.c
spade.pyparsing.c" class="py-name" href="#" onclick="return doclink('link-102', 'c', 'link-102');">c</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cases</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> <tt class="py-name">case</tt> <tt class="py-op">+=</tt> <tt id="link-103" class="py-name"><a title="spade.ACLParser.c
spade.AMS.c
spade.DF.c
spade.SL0Parser.c
spade.pyparsing.c" class="py-name" href="#" onclick="return doclink('link-103', 'c', 'link-102');">c</a></tt> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">case</tt> </tt>
</div><a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line">         </tt>
<a name="Plan.getServices"></a><div id="Plan.getServices-def"><a name="L188"></a><tt class="py-lineno">188</tt> <a class="py-toggle" href="#" id="Plan.getServices-toggle" onclick="return toggle('Plan.getServices');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Plan-class.html#getServices">getServices</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Plan.getServices-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Plan.getServices-expanded"><a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line"><tt class="py-docstring">        returns all the services of the cases that compose the plan</tt> </tt>
<a name="L191"></a><tt class="py-lineno">191</tt>  <tt class="py-line"><tt class="py-docstring">        returns a list of DF.Service</tt> </tt>
<a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line">        <tt id="link-104" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-104', 'services', 'link-43');">services</a></tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-105" class="py-name"><a title="spade.ACLParser.c
spade.AMS.c
spade.DF.c
spade.SL0Parser.c
spade.pyparsing.c" class="py-name" href="#" onclick="return doclink('link-105', 'c', 'link-102');">c</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cases</tt><tt class="py-op">:</tt> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">s</tt> <tt class="py-keyword">in</tt> <tt id="link-106" class="py-name"><a title="spade.ACLParser.c
spade.AMS.c
spade.DF.c
spade.SL0Parser.c
spade.pyparsing.c" class="py-name" href="#" onclick="return doclink('link-106', 'c', 'link-102');">c</a></tt><tt class="py-op">.</tt><tt id="link-107" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-107', 'services', 'link-43');">services</a></tt><tt class="py-op">:</tt> <tt id="link-108" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-108', 'services', 'link-43');">services</a></tt><tt class="py-op">.</tt><tt id="link-109" class="py-name"><a title="spade.pyparsing.ParseExpression.append" class="py-name" href="#" onclick="return doclink('link-109', 'append', 'link-37');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-110" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-110', 'services', 'link-43');">services</a></tt> </tt>
</div><a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line">     </tt>
<a name="Plan.insertCase"></a><div id="Plan.insertCase-def"><a name="L198"></a><tt class="py-lineno">198</tt> <a class="py-toggle" href="#" id="Plan.insertCase-toggle" onclick="return toggle('Plan.insertCase');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Plan-class.html#insertCase">insertCase</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">case</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Plan.insertCase-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Plan.insertCase-expanded"><a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line"><tt class="py-docstring">        inserts a new case at the beginning of the plan</tt> </tt>
<a name="L201"></a><tt class="py-lineno">201</tt>  <tt class="py-line"><tt class="py-docstring">        the outputs of the new case MUST match with the inputs of the plan</tt> </tt>
<a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line"><tt class="py-docstring">        returns the Plan with the new case added</tt> </tt>
<a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">case</tt><tt class="py-op">.</tt><tt id="link-111" class="py-name"><a title="spade.DF.Service.getOutputs
spade.tbcbp.Case.getOutputs
spade.tbcbp.Plan.getOutputs" class="py-name" href="#" onclick="return doclink('link-111', 'getOutputs', 'link-18');">getOutputs</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">!=</tt><tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inputs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">raise</tt> <tt class="py-name">Exception</tt> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cases</tt><tt class="py-op">.</tt><tt id="link-112" class="py-name"><a title="spade.dblite.Base.insert" class="py-name" href="#" onclick="return doclink('link-112', 'insert', 'link-20');">insert</a></tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-name">case</tt><tt class="py-op">)</tt> </tt>
<a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-113" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-113', 'P', 'link-13');">P</a></tt> <tt class="py-op">=</tt> <tt class="py-name">case</tt><tt class="py-op">.</tt><tt id="link-114" class="py-name"><a title="spade.DF.Service.getP
spade.tbcbp.Case.getP
spade.tbcbp.Plan.getP" class="py-name" href="#" onclick="return doclink('link-114', 'getP', 'link-14');">getP</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inputs</tt> <tt class="py-op">=</tt> <tt class="py-name">case</tt><tt class="py-op">.</tt><tt id="link-115" class="py-name"><a title="spade.DF.Service.getInputs
spade.tbcbp.Case.getInputs
spade.tbcbp.Plan.getInputs" class="py-name" href="#" onclick="return doclink('link-115', 'getInputs', 'link-17');">getInputs</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">         </tt>
<a name="Plan.getCasebyID"></a><div id="Plan.getCasebyID-def"><a name="L210"></a><tt class="py-lineno">210</tt> <a class="py-toggle" href="#" id="Plan.getCasebyID-toggle" onclick="return toggle('Plan.getCasebyID');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Plan-class.html#getCasebyID">getCasebyID</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">ID</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Plan.getCasebyID-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Plan.getCasebyID-expanded"><a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-116" class="py-name"><a title="spade.ACLParser.c
spade.AMS.c
spade.DF.c
spade.SL0Parser.c
spade.pyparsing.c" class="py-name" href="#" onclick="return doclink('link-116', 'c', 'link-102');">c</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cases</tt><tt class="py-op">:</tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-117" class="py-name"><a title="spade.ACLParser.c
spade.AMS.c
spade.DF.c
spade.SL0Parser.c
spade.pyparsing.c" class="py-name" href="#" onclick="return doclink('link-117', 'c', 'link-102');">c</a></tt><tt class="py-op">.</tt><tt id="link-118" class="py-name" targets="Method spade.tbcbp.Case.getID()=spade.tbcbp.Case-class.html#getID,Method spade.xmpp.protocol.Protocol.getID()=spade.xmpp.protocol.Protocol-class.html#getID"><a title="spade.tbcbp.Case.getID
spade.xmpp.protocol.Protocol.getID" class="py-name" href="#" onclick="return doclink('link-118', 'getID', 'link-118');">getID</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">==</tt><tt id="link-119" class="py-name"><a title="spade.xmpp.browser.ID
spade.xmpp.dispatcher.ID" class="py-name" href="#" onclick="return doclink('link-119', 'ID', 'link-45');">ID</a></tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt id="link-120" class="py-name"><a title="spade.ACLParser.c
spade.AMS.c
spade.DF.c
spade.SL0Parser.c
spade.pyparsing.c" class="py-name" href="#" onclick="return doclink('link-120', 'c', 'link-102');">c</a></tt> </tt>
<a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line"> </tt>
<a name="Plan.getTime"></a><div id="Plan.getTime-def"><a name="L215"></a><tt class="py-lineno">215</tt> <a class="py-toggle" href="#" id="Plan.getTime-toggle" onclick="return toggle('Plan.getTime');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Plan-class.html#getTime">getTime</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Plan.getTime-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Plan.getTime-expanded"><a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line">        <tt class="py-name">t</tt><tt class="py-op">=</tt><tt class="py-number">0</tt> </tt>
<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">case</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cases</tt><tt class="py-op">:</tt><tt class="py-name">t</tt><tt class="py-op">+=</tt><tt class="py-name">case</tt><tt class="py-op">.</tt><tt id="link-121" class="py-name" targets="Method spade.BasicFipaDateTime.BasicFipaDateTime.getTime()=spade.BasicFipaDateTime.BasicFipaDateTime-class.html#getTime,Method spade.tbcbp.Case.getTime()=spade.tbcbp.Case-class.html#getTime,Method spade.tbcbp.Plan.getTime()=spade.tbcbp.Plan-class.html#getTime"><a title="spade.BasicFipaDateTime.BasicFipaDateTime.getTime
spade.tbcbp.Case.getTime
spade.tbcbp.Plan.getTime" class="py-name" href="#" onclick="return doclink('link-121', 'getTime', 'link-121');">getTime</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">t</tt> </tt>
</div><a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line"> </tt>
<a name="Plan.getQoS"></a><div id="Plan.getQoS-def"><a name="L220"></a><tt class="py-lineno">220</tt> <a class="py-toggle" href="#" id="Plan.getQoS-toggle" onclick="return toggle('Plan.getQoS');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Plan-class.html#getQoS">getQoS</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Plan.getQoS-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Plan.getQoS-expanded"><a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line">        <tt class="py-name">q</tt><tt class="py-op">=</tt><tt class="py-number">1</tt> </tt>
<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">case</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cases</tt><tt class="py-op">:</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line">            <tt class="py-name">q</tt> <tt class="py-op">=</tt> <tt class="py-name">q</tt> <tt class="py-op">*</tt> <tt class="py-name">case</tt><tt class="py-op">.</tt><tt id="link-122" class="py-name" targets="Method spade.tbcbp.Case.getQoS()=spade.tbcbp.Case-class.html#getQoS,Method spade.tbcbp.Plan.getQoS()=spade.tbcbp.Plan-class.html#getQoS"><a title="spade.tbcbp.Case.getQoS
spade.tbcbp.Plan.getQoS" class="py-name" href="#" onclick="return doclink('link-122', 'getQoS', 'link-122');">getQoS</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">q</tt> </tt>
</div><a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line"> </tt>
<a name="Plan.__len__"></a><div id="Plan.__len__-def"><a name="L226"></a><tt class="py-lineno">226</tt> <a class="py-toggle" href="#" id="Plan.__len__-toggle" onclick="return toggle('Plan.__len__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Plan-class.html#__len__">__len__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Plan.__len__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Plan.__len__-expanded"><a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cases</tt><tt class="py-op">)</tt> </tt>
</div><a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line">         </tt>
<a name="Plan.__str__"></a><div id="Plan.__str__-def"><a name="L229"></a><tt class="py-lineno">229</tt> <a class="py-toggle" href="#" id="Plan.__str__-toggle" onclick="return toggle('Plan.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Plan-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Plan.__str__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Plan.__str__-expanded"><a name="L230"></a><tt class="py-lineno">230</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">"{P: "</tt><tt class="py-op">+</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-123" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-123', 'P', 'link-13');">P</a></tt><tt class="py-op">)</tt><tt class="py-op">+</tt> <tt class="py-string">" Q: "</tt><tt class="py-op">+</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-124" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-124', 'Q', 'link-15');">Q</a></tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">" I: "</tt><tt class="py-op">+</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inputs</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-string">" O: "</tt><tt class="py-op">+</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">outputs</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">" CASES: "</tt><tt class="py-op">+</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cases</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-string">"}"</tt> </tt>
</div><a name="Plan.__repr__"></a><div id="Plan.__repr__-def"><a name="L231"></a><tt class="py-lineno">231</tt> <a class="py-toggle" href="#" id="Plan.__repr__-toggle" onclick="return toggle('Plan.__repr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.Plan-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Plan.__repr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Plan.__repr__-expanded"><a name="L232"></a><tt class="py-lineno">232</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-125" class="py-name"><a title="spade.ACLMessage.ACLMessage.__str__
spade.AID.aid.__str__
spade.AMS.AmsAgentDescription.__str__
spade.BasicFipaDateTime.BasicFipaDateTime.__str__
spade.Behaviour.ACLTemplate.__str__
spade.DF.DfAgentDescription.__str__
spade.DF.Service.__str__
spade.DF.ServiceDescription.__str__
spade.Envelope.Envelope.__str__
spade.Platform.PlatformRestart.__str__
spade.bdi.Goal.__str__
spade.content.ContentObject.__str__
spade.kb.KBConfigurationFailed.__str__
spade.pyparsing.And.__str__
spade.pyparsing.CharsNotIn.__str__
spade.pyparsing.Each.__str__
spade.pyparsing.Forward.__str__
spade.pyparsing.MatchFirst.__str__
spade.pyparsing.NotAny.__str__
spade.pyparsing.OneOrMore.__str__
spade.pyparsing.Optional.__str__
spade.pyparsing.Or.__str__
spade.pyparsing.ParseBaseException.__str__
spade.pyparsing.ParseElementEnhance.__str__
spade.pyparsing.ParseExpression.__str__
spade.pyparsing.ParseResults.__str__
spade.pyparsing.ParserElement.__str__
spade.pyparsing.RecursiveGrammarException.__str__
spade.pyparsing.Word.__str__
spade.pyparsing.ZeroOrMore.__str__
spade.pyparsing._ForwardNoRecurse.__str__
spade.pyratemp.TemplateBase.__str__
spade.pyratemp.TemplateParseError.__str__
spade.tbcbp.Case.__str__
spade.tbcbp.Plan.__str__
spade.xmpp.protocol.JID.__str__
spade.xmpp.simplexml.Node.__str__
spade.xmpp.transports.error.__str__
spade.xmppd.modules.db_fake.DB.__str__
spade.xmppd.modules.muc.Participant.__str__
spade.xmppd.modules.muc.Room.__str__
spade.xmppd.modules.pubsub.PSNode.__str__" class="py-name" href="#" onclick="return doclink('link-125', '__str__', 'link-87');">__str__</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L233"></a><tt class="py-lineno">233</tt>  <tt class="py-line"> </tt>
<a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line"> </tt>
<a name="TBCBP"></a><div id="TBCBP-def"><a name="L235"></a><tt class="py-lineno">235</tt> <a class="py-toggle" href="#" id="TBCBP-toggle" onclick="return toggle('TBCBP');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="spade.tbcbp.TBCBP-class.html">TBCBP</a><tt class="py-op">:</tt> </tt>
</div><div id="TBCBP-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="TBCBP-expanded"><a name="L236"></a><tt class="py-lineno">236</tt>  <tt class="py-line">     </tt>
<a name="TBCBP.__init__"></a><div id="TBCBP.__init__-def"><a name="L237"></a><tt class="py-lineno">237</tt> <a class="py-toggle" href="#" id="TBCBP.__init__-toggle" onclick="return toggle('TBCBP.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.TBCBP-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">rl</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-string">'maxth'</tt><tt class="py-op">:</tt><tt class="py-number">0.95</tt><tt class="py-op">,</tt> <tt class="py-string">'limit'</tt><tt class="py-op">:</tt><tt class="py-number">10000</tt><tt class="py-op">}</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TBCBP.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TBCBP.__init__-expanded"><a name="L238"></a><tt class="py-lineno">238</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-126" class="py-name"><a title="spade.xmppd.modules.db_fake.DB.db
spade.xmppd.modules.db_fake.db" class="py-name" href="#" onclick="return doclink('link-126', 'db', 'link-6');">db</a></tt> <tt class="py-op">=</tt> <tt id="link-127" class="py-name" targets="Class spade.tbcbp.CaseDB=spade.tbcbp.CaseDB-class.html"><a title="spade.tbcbp.CaseDB" class="py-name" href="#" onclick="return doclink('link-127', 'CaseDB', 'link-127');">CaseDB</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-comment">#dict()</tt> </tt>
<a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-128" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-128', 'services', 'link-43');">services</a></tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L240"></a><tt class="py-lineno">240</tt>  <tt class="py-line">         </tt>
<a name="L241"></a><tt class="py-lineno">241</tt>  <tt class="py-line">        <tt class="py-comment">#RL values</tt> </tt>
<a name="L242"></a><tt class="py-lineno">242</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">threshold</tt> <tt class="py-op">=</tt> <tt class="py-number">0.0</tt> </tt>
<a name="L243"></a><tt class="py-lineno">243</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">max_threshold</tt> <tt class="py-op">=</tt> <tt class="py-name">rl</tt><tt class="py-op">[</tt><tt class="py-string">'maxth'</tt><tt class="py-op">]</tt> </tt>
<a name="L244"></a><tt class="py-lineno">244</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">limit_steps</tt> <tt class="py-op">=</tt> <tt class="py-name">rl</tt><tt class="py-op">[</tt><tt class="py-string">'limit'</tt><tt class="py-op">]</tt> </tt>
<a name="L245"></a><tt class="py-lineno">245</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">steps</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt>
<a name="L246"></a><tt class="py-lineno">246</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">RLlimit</tt> <tt class="py-op">=</tt> <tt class="py-name">log</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">limit_steps</tt><tt class="py-op">)</tt> </tt>
</div><a name="L247"></a><tt class="py-lineno">247</tt>  <tt class="py-line">         </tt>
<a name="TBCBP.getCaseTime"></a><div id="TBCBP.getCaseTime-def"><a name="L248"></a><tt class="py-lineno">248</tt> <a class="py-toggle" href="#" id="TBCBP.getCaseTime-toggle" onclick="return toggle('TBCBP.getCaseTime');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.TBCBP-class.html#getCaseTime">getCaseTime</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">case</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TBCBP.getCaseTime-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TBCBP.getCaseTime-expanded"><a name="L249"></a><tt class="py-lineno">249</tt>  <tt class="py-line">        <tt class="py-name">t</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L250"></a><tt class="py-lineno">250</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-129" class="py-name" targets="Variable spade.Agent.name=spade.Agent-module.html#name,Variable spade.MTP.name=spade.MTP-module.html#name,Variable spade.Organization.name=spade.Organization-module.html#name,Variable spade.Organization_new.name=spade.Organization_new-module.html#name,Variable spade.Unit.name=spade.Unit-module.html#name,Variable spade.Unit_new.name=spade.Unit_new-module.html#name,Variable spade.pubsub.name=spade.pubsub-module.html#name,Variable spade.socialnetwork.name=spade.socialnetwork-module.html#name,Variable spade.xmpp.auth.name=spade.xmpp.auth-module.html#name,Variable spade.xmpp.browser.name=spade.xmpp.browser-module.html#name,Variable spade.xmpp.commands.Command_Handler_Prototype.name=spade.xmpp.commands.Command_Handler_Prototype-class.html#name,Variable spade.xmpp.commands.TestCommand.name=spade.xmpp.commands.TestCommand-class.html#name,Variable spade.xmpp.commands.name=spade.xmpp.commands-module.html#name,Variable spade.xmpp.dispatcher.name=spade.xmpp.dispatcher-module.html#name,Variable spade.xmpp.features.name=spade.xmpp.features-module.html#name,Variable spade.xmpp.filetransfer.name=spade.xmpp.filetransfer-module.html#name,Variable spade.xmpp.name=spade.xmpp-module.html#name,Variable spade.xmpp.protocol.name=spade.xmpp.protocol-module.html#name,Variable spade.xmpp.roster.name=spade.xmpp.roster-module.html#name,Variable spade.xmpp.transports.name=spade.xmpp.transports-module.html#name,Variable spade.xmppd.modules.config.name=spade.xmppd.modules.config-module.html#name,Variable spade.xmppd.modules.db_fake.name=spade.xmppd.modules.db_fake-module.html#name,Variable spade.xmppd.modules.dialback.name=spade.xmppd.modules.dialback-module.html#name,Variable spade.xmppd.modules.jep0077.name=spade.xmppd.modules.jep0077-module.html#name,Variable spade.xmppd.modules.jep0078.name=spade.xmppd.modules.jep0078-module.html#name,Variable spade.xmppd.modules.message.name=spade.xmppd.modules.message-module.html#name,Variable spade.xmppd.modules.muc.name=spade.xmppd.modules.muc-module.html#name,Variable spade.xmppd.modules.oob.name=spade.xmppd.modules.oob-module.html#name,Variable spade.xmppd.modules.pubsub.name=spade.xmppd.modules.pubsub-module.html#name,Variable spade.xmppd.modules.roster.name=spade.xmppd.modules.roster-module.html#name,Variable spade.xmppd.modules.router.name=spade.xmppd.modules.router-module.html#name,Variable spade.xmppd.modules.stream.name=spade.xmppd.modules.stream-module.html#name,Variable spade.xmppd.modules.webadmin.name=spade.xmppd.modules.webadmin-module.html#name,Variable spade.xmppd.modules.wq.name=spade.xmppd.modules.wq-module.html#name,Variable spade.xmppd.xmppd.name=spade.xmppd.xmppd-module.html#name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.pubsub.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.modules.config.name
spade.xmppd.modules.db_fake.name
spade.xmppd.modules.dialback.name
spade.xmppd.modules.jep0077.name
spade.xmppd.modules.jep0078.name
spade.xmppd.modules.message.name
spade.xmppd.modules.muc.name
spade.xmppd.modules.oob.name
spade.xmppd.modules.pubsub.name
spade.xmppd.modules.roster.name
spade.xmppd.modules.router.name
spade.xmppd.modules.stream.name
spade.xmppd.modules.webadmin.name
spade.xmppd.modules.wq.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-129', 'name', 'link-129');">name</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">case</tt><tt class="py-op">.</tt><tt id="link-130" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-130', 'services', 'link-43');">services</a></tt><tt class="py-op">:</tt> </tt>
<a name="L251"></a><tt class="py-lineno">251</tt>  <tt class="py-line">            <tt class="py-name">t</tt> <tt class="py-op">+=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-131" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-131', 'services', 'link-43');">services</a></tt><tt class="py-op">[</tt><tt id="link-132" class="py-name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.pubsub.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.modules.config.name
spade.xmppd.modules.db_fake.name
spade.xmppd.modules.dialback.name
spade.xmppd.modules.jep0077.name
spade.xmppd.modules.jep0078.name
spade.xmppd.modules.message.name
spade.xmppd.modules.muc.name
spade.xmppd.modules.oob.name
spade.xmppd.modules.pubsub.name
spade.xmppd.modules.roster.name
spade.xmppd.modules.router.name
spade.xmppd.modules.stream.name
spade.xmppd.modules.webadmin.name
spade.xmppd.modules.wq.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-132', 'name', 'link-129');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">"time"</tt><tt class="py-op">]</tt> </tt>
<a name="L252"></a><tt class="py-lineno">252</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">t</tt> </tt>
</div><a name="L253"></a><tt class="py-lineno">253</tt>  <tt class="py-line">         </tt>
<a name="TBCBP.registerService"></a><div id="TBCBP.registerService-def"><a name="L254"></a><tt class="py-lineno">254</tt> <a class="py-toggle" href="#" id="TBCBP.registerService-toggle" onclick="return toggle('TBCBP.registerService');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.TBCBP-class.html#registerService">registerService</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">service</tt><tt class="py-op">,</tt> <tt class="py-param">time</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-param">QoS</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TBCBP.registerService-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TBCBP.registerService-expanded"><a name="L255"></a><tt class="py-lineno">255</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L256"></a><tt class="py-lineno">256</tt>  <tt class="py-line"><tt class="py-docstring">        registers a DF.Service</tt> </tt>
<a name="L257"></a><tt class="py-lineno">257</tt>  <tt class="py-line"><tt class="py-docstring">        time and QoS parameters are optional</tt> </tt>
<a name="L258"></a><tt class="py-lineno">258</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L259"></a><tt class="py-lineno">259</tt>  <tt class="py-line">        <tt id="link-133" class="py-name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.pubsub.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.modules.config.name
spade.xmppd.modules.db_fake.name
spade.xmppd.modules.dialback.name
spade.xmppd.modules.jep0077.name
spade.xmppd.modules.jep0078.name
spade.xmppd.modules.message.name
spade.xmppd.modules.muc.name
spade.xmppd.modules.oob.name
spade.xmppd.modules.pubsub.name
spade.xmppd.modules.roster.name
spade.xmppd.modules.router.name
spade.xmppd.modules.stream.name
spade.xmppd.modules.webadmin.name
spade.xmppd.modules.wq.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-133', 'name', 'link-129');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">service</tt><tt class="py-op">.</tt><tt id="link-134" class="py-name" targets="Method spade.AID.aid.getName()=spade.AID.aid-class.html#getName,Method spade.Agent.AbstractAgent.getName()=spade.Agent.AbstractAgent-class.html#getName,Method spade.DF.DfAgentDescription.getName()=spade.DF.DfAgentDescription-class.html#getName,Method spade.DF.Service.getName()=spade.DF.Service-class.html#getName,Method spade.DF.ServiceDescription.getName()=spade.DF.ServiceDescription-class.html#getName,Method spade.pyparsing.ParseResults.getName()=spade.pyparsing.ParseResults-class.html#getName,Method spade.xmpp.roster.Roster.getName()=spade.xmpp.roster.Roster-class.html#getName,Method spade.xmpp.simplexml.Node.getName()=spade.xmpp.simplexml.Node-class.html#getName,Method spade.xmppd.modules.muc.Room.getName()=spade.xmppd.modules.muc.Room-class.html#getName,Method spade.xmppd.modules.wq.Group.getName()=spade.xmppd.modules.wq.Group-class.html#getName,Method spade.xmppd.xmppd.Session.getName()=spade.xmppd.xmppd.Session-class.html#getName"><a title="spade.AID.aid.getName
spade.Agent.AbstractAgent.getName
spade.DF.DfAgentDescription.getName
spade.DF.Service.getName
spade.DF.ServiceDescription.getName
spade.pyparsing.ParseResults.getName
spade.xmpp.roster.Roster.getName
spade.xmpp.simplexml.Node.getName
spade.xmppd.modules.muc.Room.getName
spade.xmppd.modules.wq.Group.getName
spade.xmppd.xmppd.Session.getName" class="py-name" href="#" onclick="return doclink('link-134', 'getName', 'link-134');">getName</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L260"></a><tt class="py-lineno">260</tt>  <tt class="py-line">        <tt id="link-135" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-135', 'P', 'link-13');">P</a></tt> <tt class="py-op">=</tt> <tt class="py-name">service</tt><tt class="py-op">.</tt><tt id="link-136" class="py-name"><a title="spade.DF.Service.getP
spade.tbcbp.Case.getP
spade.tbcbp.Plan.getP" class="py-name" href="#" onclick="return doclink('link-136', 'getP', 'link-14');">getP</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L261"></a><tt class="py-lineno">261</tt>  <tt class="py-line">        <tt id="link-137" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-137', 'Q', 'link-15');">Q</a></tt> <tt class="py-op">=</tt> <tt class="py-name">service</tt><tt class="py-op">.</tt><tt id="link-138" class="py-name"><a title="spade.DF.Service.getQ
spade.tbcbp.Case.getQ
spade.tbcbp.Plan.getQ" class="py-name" href="#" onclick="return doclink('link-138', 'getQ', 'link-16');">getQ</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L262"></a><tt class="py-lineno">262</tt>  <tt class="py-line">        <tt class="py-name">I</tt> <tt class="py-op">=</tt> <tt class="py-name">service</tt><tt class="py-op">.</tt><tt id="link-139" class="py-name"><a title="spade.DF.Service.getInputs
spade.tbcbp.Case.getInputs
spade.tbcbp.Plan.getInputs" class="py-name" href="#" onclick="return doclink('link-139', 'getInputs', 'link-17');">getInputs</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L263"></a><tt class="py-lineno">263</tt>  <tt class="py-line">        <tt class="py-name">O</tt> <tt class="py-op">=</tt> <tt class="py-name">service</tt><tt class="py-op">.</tt><tt id="link-140" class="py-name"><a title="spade.DF.Service.getOutputs
spade.tbcbp.Case.getOutputs
spade.tbcbp.Plan.getOutputs" class="py-name" href="#" onclick="return doclink('link-140', 'getOutputs', 'link-18');">getOutputs</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L264"></a><tt class="py-lineno">264</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-141" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-141', 'services', 'link-43');">services</a></tt><tt class="py-op">[</tt><tt id="link-142" class="py-name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.pubsub.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.modules.config.name
spade.xmppd.modules.db_fake.name
spade.xmppd.modules.dialback.name
spade.xmppd.modules.jep0077.name
spade.xmppd.modules.jep0078.name
spade.xmppd.modules.message.name
spade.xmppd.modules.muc.name
spade.xmppd.modules.oob.name
spade.xmppd.modules.pubsub.name
spade.xmppd.modules.roster.name
spade.xmppd.modules.router.name
spade.xmppd.modules.stream.name
spade.xmppd.modules.webadmin.name
spade.xmppd.modules.wq.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-142', 'name', 'link-129');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-string">'name'</tt><tt class="py-op">:</tt><tt id="link-143" class="py-name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.pubsub.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.modules.config.name
spade.xmppd.modules.db_fake.name
spade.xmppd.modules.dialback.name
spade.xmppd.modules.jep0077.name
spade.xmppd.modules.jep0078.name
spade.xmppd.modules.message.name
spade.xmppd.modules.muc.name
spade.xmppd.modules.oob.name
spade.xmppd.modules.pubsub.name
spade.xmppd.modules.roster.name
spade.xmppd.modules.router.name
spade.xmppd.modules.stream.name
spade.xmppd.modules.webadmin.name
spade.xmppd.modules.wq.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-143', 'name', 'link-129');">name</a></tt><tt class="py-op">,</tt><tt class="py-string">'s'</tt><tt class="py-op">:</tt><tt class="py-name">service</tt><tt class="py-op">,</tt><tt class="py-string">"P"</tt><tt class="py-op">:</tt><tt id="link-144" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-144', 'P', 'link-13');">P</a></tt><tt class="py-op">,</tt><tt class="py-string">"Q"</tt><tt class="py-op">:</tt><tt id="link-145" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-145', 'Q', 'link-15');">Q</a></tt><tt class="py-op">,</tt><tt class="py-string">"inputs"</tt><tt class="py-op">:</tt><tt class="py-name">I</tt><tt class="py-op">,</tt> <tt class="py-string">"outputs"</tt><tt class="py-op">:</tt><tt class="py-name">O</tt><tt class="py-op">,</tt> <tt class="py-string">"time"</tt><tt class="py-op">:</tt><tt class="py-name">time</tt><tt class="py-op">,</tt><tt class="py-string">"QoS"</tt><tt class="py-op">:</tt><tt class="py-name">QoS</tt><tt class="py-op">}</tt> </tt>
<a name="L265"></a><tt class="py-lineno">265</tt>  <tt class="py-line"> </tt>
<a name="L266"></a><tt class="py-lineno">266</tt>  <tt class="py-line">        <tt class="py-name">case</tt> <tt class="py-op">=</tt> <tt id="link-146" class="py-name"><a title="spade.tbcbp.Case" class="py-name" href="#" onclick="return doclink('link-146', 'Case', 'link-53');">Case</a></tt><tt class="py-op">(</tt><tt id="link-147" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-147', 'P', 'link-13');">P</a></tt><tt class="py-op">=</tt><tt id="link-148" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-148', 'P', 'link-13');">P</a></tt><tt class="py-op">,</tt><tt id="link-149" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-149', 'Q', 'link-15');">Q</a></tt><tt class="py-op">=</tt><tt id="link-150" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-150', 'Q', 'link-15');">Q</a></tt><tt class="py-op">,</tt><tt class="py-name">inputs</tt><tt class="py-op">=</tt><tt class="py-name">I</tt><tt class="py-op">,</tt><tt class="py-name">outputs</tt><tt class="py-op">=</tt><tt class="py-name">O</tt><tt class="py-op">,</tt> <tt id="link-151" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-151', 'services', 'link-43');">services</a></tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt id="link-152" class="py-name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.pubsub.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.modules.config.name
spade.xmppd.modules.db_fake.name
spade.xmppd.modules.dialback.name
spade.xmppd.modules.jep0077.name
spade.xmppd.modules.jep0078.name
spade.xmppd.modules.message.name
spade.xmppd.modules.muc.name
spade.xmppd.modules.oob.name
spade.xmppd.modules.pubsub.name
spade.xmppd.modules.roster.name
spade.xmppd.modules.router.name
spade.xmppd.modules.stream.name
spade.xmppd.modules.webadmin.name
spade.xmppd.modules.wq.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-152', 'name', 'link-129');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt><tt class="py-name">QoS</tt><tt class="py-op">=</tt><tt class="py-name">QoS</tt><tt class="py-op">)</tt> </tt>
<a name="L267"></a><tt class="py-lineno">267</tt>  <tt class="py-line">        <tt class="py-name">case</tt><tt class="py-op">.</tt><tt class="py-name">time</tt> <tt class="py-op">=</tt> <tt class="py-name">time</tt> <tt class="py-comment">#self.getCaseTime(case)</tt> </tt>
<a name="L268"></a><tt class="py-lineno">268</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-153" class="py-name" targets="Method spade.tbcbp.TBCBP.addCase()=spade.tbcbp.TBCBP-class.html#addCase"><a title="spade.tbcbp.TBCBP.addCase" class="py-name" href="#" onclick="return doclink('link-153', 'addCase', 'link-153');">addCase</a></tt><tt class="py-op">(</tt><tt class="py-name">case</tt><tt class="py-op">)</tt> </tt>
<a name="L269"></a><tt class="py-lineno">269</tt>  <tt class="py-line">         </tt>
<a name="L270"></a><tt class="py-lineno">270</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">case</tt> </tt>
</div><a name="L271"></a><tt class="py-lineno">271</tt>  <tt class="py-line">        <tt class="py-comment">#print "TBCBP::Service Registered: "+str(case)</tt> </tt>
<a name="L272"></a><tt class="py-lineno">272</tt>  <tt class="py-line">         </tt>
<a name="TBCBP.delService"></a><div id="TBCBP.delService-def"><a name="L273"></a><tt class="py-lineno">273</tt> <a class="py-toggle" href="#" id="TBCBP.delService-toggle" onclick="return toggle('TBCBP.delService');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.TBCBP-class.html#delService">delService</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TBCBP.delService-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TBCBP.delService-expanded"><a name="L274"></a><tt class="py-lineno">274</tt>  <tt class="py-line">        <tt class="py-comment">#TODO</tt> </tt>
<a name="L275"></a><tt class="py-lineno">275</tt>  <tt class="py-line">        <tt class="py-keyword">pass</tt>         </tt>
</div><a name="TBCBP.getService"></a><div id="TBCBP.getService-def"><a name="L276"></a><tt class="py-lineno">276</tt> <a class="py-toggle" href="#" id="TBCBP.getService-toggle" onclick="return toggle('TBCBP.getService');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.TBCBP-class.html#getService">getService</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TBCBP.getService-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TBCBP.getService-expanded"><a name="L277"></a><tt class="py-lineno">277</tt>  <tt class="py-line">        <tt class="py-docstring">'''returns a DF.Service'''</tt> </tt>
<a name="L278"></a><tt class="py-lineno">278</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-154" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-154', 'services', 'link-43');">services</a></tt><tt class="py-op">.</tt><tt class="py-name">has_key</tt><tt class="py-op">(</tt><tt id="link-155" class="py-name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.pubsub.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.modules.config.name
spade.xmppd.modules.db_fake.name
spade.xmppd.modules.dialback.name
spade.xmppd.modules.jep0077.name
spade.xmppd.modules.jep0078.name
spade.xmppd.modules.message.name
spade.xmppd.modules.muc.name
spade.xmppd.modules.oob.name
spade.xmppd.modules.pubsub.name
spade.xmppd.modules.roster.name
spade.xmppd.modules.router.name
spade.xmppd.modules.stream.name
spade.xmppd.modules.webadmin.name
spade.xmppd.modules.wq.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-155', 'name', 'link-129');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L279"></a><tt class="py-lineno">279</tt>  <tt class="py-line">            <tt class="py-comment">#print color_red + str(self.services[name]['s']) + color_none</tt> </tt>
<a name="L280"></a><tt class="py-lineno">280</tt>  <tt class="py-line">            <tt class="py-comment">#s = self.services[name]["s"](P=self.services[name]["P"],Q=self.services[name]["Q"],inputs=self.services[name]["inputs"],outputs=self.services[name]["outputs"],name=name)</tt> </tt>
<a name="L281"></a><tt class="py-lineno">281</tt>  <tt class="py-line">            <tt class="py-comment">#return s</tt> </tt>
<a name="L282"></a><tt class="py-lineno">282</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-156" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-156', 'services', 'link-43');">services</a></tt><tt class="py-op">[</tt><tt id="link-157" class="py-name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.pubsub.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.modules.config.name
spade.xmppd.modules.db_fake.name
spade.xmppd.modules.dialback.name
spade.xmppd.modules.jep0077.name
spade.xmppd.modules.jep0078.name
spade.xmppd.modules.message.name
spade.xmppd.modules.muc.name
spade.xmppd.modules.oob.name
spade.xmppd.modules.pubsub.name
spade.xmppd.modules.roster.name
spade.xmppd.modules.router.name
spade.xmppd.modules.stream.name
spade.xmppd.modules.webadmin.name
spade.xmppd.modules.wq.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-157', 'name', 'link-129');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'s'</tt><tt class="py-op">]</tt> </tt>
<a name="L283"></a><tt class="py-lineno">283</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L284"></a><tt class="py-lineno">284</tt>  <tt class="py-line"> </tt>
<a name="TBCBP.getServiceInfo"></a><div id="TBCBP.getServiceInfo-def"><a name="L285"></a><tt class="py-lineno">285</tt> <a class="py-toggle" href="#" id="TBCBP.getServiceInfo-toggle" onclick="return toggle('TBCBP.getServiceInfo');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.TBCBP-class.html#getServiceInfo">getServiceInfo</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TBCBP.getServiceInfo-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TBCBP.getServiceInfo-expanded"><a name="L286"></a><tt class="py-lineno">286</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L287"></a><tt class="py-lineno">287</tt>  <tt class="py-line"><tt class="py-docstring">        returns info of a service</tt> </tt>
<a name="L288"></a><tt class="py-lineno">288</tt>  <tt class="py-line"><tt class="py-docstring">        Usage:</tt> </tt>
<a name="L289"></a><tt class="py-lineno">289</tt>  <tt class="py-line"><tt class="py-docstring">        name - string with the name of the service</tt> </tt>
<a name="L290"></a><tt class="py-lineno">290</tt>  <tt class="py-line"><tt class="py-docstring">        returns a dict with the info of the service</tt> </tt>
<a name="L291"></a><tt class="py-lineno">291</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L292"></a><tt class="py-lineno">292</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-158" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-158', 'services', 'link-43');">services</a></tt><tt class="py-op">.</tt><tt class="py-name">has_key</tt><tt class="py-op">(</tt><tt id="link-159" class="py-name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.pubsub.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.modules.config.name
spade.xmppd.modules.db_fake.name
spade.xmppd.modules.dialback.name
spade.xmppd.modules.jep0077.name
spade.xmppd.modules.jep0078.name
spade.xmppd.modules.message.name
spade.xmppd.modules.muc.name
spade.xmppd.modules.oob.name
spade.xmppd.modules.pubsub.name
spade.xmppd.modules.roster.name
spade.xmppd.modules.router.name
spade.xmppd.modules.stream.name
spade.xmppd.modules.webadmin.name
spade.xmppd.modules.wq.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-159', 'name', 'link-129');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L293"></a><tt class="py-lineno">293</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-160" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-160', 'services', 'link-43');">services</a></tt><tt class="py-op">[</tt><tt id="link-161" class="py-name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.pubsub.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.modules.config.name
spade.xmppd.modules.db_fake.name
spade.xmppd.modules.dialback.name
spade.xmppd.modules.jep0077.name
spade.xmppd.modules.jep0078.name
spade.xmppd.modules.message.name
spade.xmppd.modules.muc.name
spade.xmppd.modules.oob.name
spade.xmppd.modules.pubsub.name
spade.xmppd.modules.roster.name
spade.xmppd.modules.router.name
spade.xmppd.modules.stream.name
spade.xmppd.modules.webadmin.name
spade.xmppd.modules.wq.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-161', 'name', 'link-129');">name</a></tt><tt class="py-op">]</tt> </tt>
</div><a name="L294"></a><tt class="py-lineno">294</tt>  <tt class="py-line"> </tt>
<a name="TBCBP.addCase"></a><div id="TBCBP.addCase-def"><a name="L295"></a><tt class="py-lineno">295</tt> <a class="py-toggle" href="#" id="TBCBP.addCase-toggle" onclick="return toggle('TBCBP.addCase');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.TBCBP-class.html#addCase">addCase</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">case</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TBCBP.addCase-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TBCBP.addCase-expanded"><a name="L296"></a><tt class="py-lineno">296</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L297"></a><tt class="py-lineno">297</tt>  <tt class="py-line"><tt class="py-docstring">        inserts a new case in the case-base</tt> </tt>
<a name="L298"></a><tt class="py-lineno">298</tt>  <tt class="py-line"><tt class="py-docstring">        services of the case MUST be registered in the TBCBP</tt> </tt>
<a name="L299"></a><tt class="py-lineno">299</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L300"></a><tt class="py-lineno">300</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">s</tt> <tt class="py-keyword">in</tt> <tt class="py-name">case</tt><tt class="py-op">.</tt><tt id="link-162" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-162', 'services', 'link-43');">services</a></tt><tt class="py-op">:</tt> </tt>
<a name="L301"></a><tt class="py-lineno">301</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">s</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-163" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-163', 'services', 'link-43');">services</a></tt><tt class="py-op">.</tt><tt id="link-164" class="py-name" targets="Method spade.dblite.Index.keys()=spade.dblite.Index-class.html#keys,Method spade.odict.odict.keys()=spade.odict.odict-class.html#keys,Method spade.pyparsing.ParseResults.keys()=spade.pyparsing.ParseResults-class.html#keys,Method spade.xmpp.roster.Roster.keys()=spade.xmpp.roster.Roster-class.html#keys"><a title="spade.dblite.Index.keys
spade.odict.odict.keys
spade.pyparsing.ParseResults.keys
spade.xmpp.roster.Roster.keys" class="py-name" href="#" onclick="return doclink('link-164', 'keys', 'link-164');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L302"></a><tt class="py-lineno">302</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L303"></a><tt class="py-lineno">303</tt>  <tt class="py-line">        <tt class="py-name">case</tt><tt class="py-op">.</tt><tt class="py-name">time</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-165" class="py-name" targets="Method spade.tbcbp.TBCBP.getCaseTime()=spade.tbcbp.TBCBP-class.html#getCaseTime"><a title="spade.tbcbp.TBCBP.getCaseTime" class="py-name" href="#" onclick="return doclink('link-165', 'getCaseTime', 'link-165');">getCaseTime</a></tt><tt class="py-op">(</tt><tt class="py-name">case</tt><tt class="py-op">)</tt> </tt>
<a name="L304"></a><tt class="py-lineno">304</tt>  <tt class="py-line">         </tt>
<a name="L305"></a><tt class="py-lineno">305</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-166" class="py-name"><a title="spade.xmppd.modules.db_fake.DB.db
spade.xmppd.modules.db_fake.db" class="py-name" href="#" onclick="return doclink('link-166', 'db', 'link-6');">db</a></tt><tt class="py-op">.</tt><tt id="link-167" class="py-name" targets="Method spade.bdi.PlanList.add()=spade.bdi.PlanList-class.html#add,Method spade.tbcbp.CaseDB.add()=spade.tbcbp.CaseDB-class.html#add"><a title="spade.bdi.PlanList.add
spade.tbcbp.CaseDB.add" class="py-name" href="#" onclick="return doclink('link-167', 'add', 'link-167');">add</a></tt><tt class="py-op">(</tt><tt class="py-name">case</tt><tt class="py-op">)</tt> </tt>
<a name="L306"></a><tt class="py-lineno">306</tt>  <tt class="py-line">             </tt>
<a name="L307"></a><tt class="py-lineno">307</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L308"></a><tt class="py-lineno">308</tt>  <tt class="py-line">         </tt>
<a name="TBCBP.addPlan"></a><div id="TBCBP.addPlan-def"><a name="L309"></a><tt class="py-lineno">309</tt> <a class="py-toggle" href="#" id="TBCBP.addPlan-toggle" onclick="return toggle('TBCBP.addPlan');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.TBCBP-class.html#addPlan">addPlan</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">plan</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TBCBP.addPlan-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TBCBP.addPlan-expanded"><a name="L310"></a><tt class="py-lineno">310</tt>  <tt class="py-line">        <tt class="py-name">case</tt> <tt class="py-op">=</tt> <tt class="py-name">plan</tt><tt class="py-op">.</tt><tt id="link-168" class="py-name" targets="Method spade.tbcbp.Plan.getCase()=spade.tbcbp.Plan-class.html#getCase,Method spade.tbcbp.TBCBP.getCase()=spade.tbcbp.TBCBP-class.html#getCase"><a title="spade.tbcbp.Plan.getCase
spade.tbcbp.TBCBP.getCase" class="py-name" href="#" onclick="return doclink('link-168', 'getCase', 'link-168');">getCase</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L311"></a><tt class="py-lineno">311</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-169" class="py-name"><a title="spade.tbcbp.TBCBP.addCase" class="py-name" href="#" onclick="return doclink('link-169', 'addCase', 'link-153');">addCase</a></tt><tt class="py-op">(</tt><tt class="py-name">case</tt><tt class="py-op">)</tt> </tt>
</div><a name="L312"></a><tt class="py-lineno">312</tt>  <tt class="py-line">             </tt>
<a name="L313"></a><tt class="py-lineno">313</tt>  <tt class="py-line">         </tt>
<a name="TBCBP.getCases"></a><div id="TBCBP.getCases-def"><a name="L314"></a><tt class="py-lineno">314</tt> <a class="py-toggle" href="#" id="TBCBP.getCases-toggle" onclick="return toggle('TBCBP.getCases');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.TBCBP-class.html#getCases">getCases</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">P</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">Q</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">inputs</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">outputs</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TBCBP.getCases-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TBCBP.getCases-expanded"><a name="L315"></a><tt class="py-lineno">315</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L316"></a><tt class="py-lineno">316</tt>  <tt class="py-line"><tt class="py-docstring">        returns a list of cases where the P,Q,inputs and outputs match.</tt> </tt>
<a name="L317"></a><tt class="py-lineno">317</tt>  <tt class="py-line"><tt class="py-docstring">        it only compares parameters if they are not None</tt> </tt>
<a name="L318"></a><tt class="py-lineno">318</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L319"></a><tt class="py-lineno">319</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-170" class="py-name"><a title="spade.xmppd.modules.db_fake.DB.db
spade.xmppd.modules.db_fake.db" class="py-name" href="#" onclick="return doclink('link-170', 'db', 'link-6');">db</a></tt><tt class="py-op">.</tt><tt id="link-171" class="py-name" targets="Method spade.FlexQueue.FlexQueue.get()=spade.FlexQueue.FlexQueue-class.html#get,Method spade.kb.KB.get()=spade.kb.KB-class.html#get,Method spade.tbcbp.CaseDB.get()=spade.tbcbp.CaseDB-class.html#get,Method spade.xmppd.modules.db_fake.DB.get()=spade.xmppd.modules.db_fake.DB-class.html#get"><a title="spade.FlexQueue.FlexQueue.get
spade.kb.KB.get
spade.tbcbp.CaseDB.get
spade.xmppd.modules.db_fake.DB.get" class="py-name" href="#" onclick="return doclink('link-171', 'get', 'link-171');">get</a></tt><tt class="py-op">(</tt><tt id="link-172" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-172', 'P', 'link-13');">P</a></tt><tt class="py-op">,</tt><tt id="link-173" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-173', 'Q', 'link-15');">Q</a></tt><tt class="py-op">,</tt><tt class="py-name">inputs</tt><tt class="py-op">,</tt><tt class="py-name">outputs</tt><tt class="py-op">)</tt> </tt>
</div><a name="L320"></a><tt class="py-lineno">320</tt>  <tt class="py-line">     </tt>
<a name="TBCBP.getCase"></a><div id="TBCBP.getCase-def"><a name="L321"></a><tt class="py-lineno">321</tt> <a class="py-toggle" href="#" id="TBCBP.getCase-toggle" onclick="return toggle('TBCBP.getCase');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.TBCBP-class.html#getCase">getCase</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">case</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TBCBP.getCase-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TBCBP.getCase-expanded"><a name="L322"></a><tt class="py-lineno">322</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L323"></a><tt class="py-lineno">323</tt>  <tt class="py-line"><tt class="py-docstring">        returns the case of the case-base whose parameters (P,Q,inputs and outputs) match with the 'case' parameters</tt> </tt>
<a name="L324"></a><tt class="py-lineno">324</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L325"></a><tt class="py-lineno">325</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L326"></a><tt class="py-lineno">326</tt>  <tt class="py-line">            <tt class="py-name">res</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-174" class="py-name"><a title="spade.xmppd.modules.db_fake.DB.db
spade.xmppd.modules.db_fake.db" class="py-name" href="#" onclick="return doclink('link-174', 'db', 'link-6');">db</a></tt><tt class="py-op">.</tt><tt id="link-175" class="py-name"><a title="spade.FlexQueue.FlexQueue.get
spade.kb.KB.get
spade.tbcbp.CaseDB.get
spade.xmppd.modules.db_fake.DB.get" class="py-name" href="#" onclick="return doclink('link-175', 'get', 'link-171');">get</a></tt><tt class="py-op">(</tt><tt id="link-176" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-176', 'P', 'link-13');">P</a></tt><tt class="py-op">=</tt><tt class="py-name">case</tt><tt class="py-op">.</tt><tt id="link-177" class="py-name"><a title="spade.DF.Service.getP
spade.tbcbp.Case.getP
spade.tbcbp.Plan.getP" class="py-name" href="#" onclick="return doclink('link-177', 'getP', 'link-14');">getP</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt id="link-178" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-178', 'Q', 'link-15');">Q</a></tt><tt class="py-op">=</tt><tt class="py-name">case</tt><tt class="py-op">.</tt><tt id="link-179" class="py-name"><a title="spade.DF.Service.getQ
spade.tbcbp.Case.getQ
spade.tbcbp.Plan.getQ" class="py-name" href="#" onclick="return doclink('link-179', 'getQ', 'link-16');">getQ</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">inputs</tt><tt class="py-op">=</tt><tt class="py-name">case</tt><tt class="py-op">.</tt><tt id="link-180" class="py-name"><a title="spade.DF.Service.getInputs
spade.tbcbp.Case.getInputs
spade.tbcbp.Plan.getInputs" class="py-name" href="#" onclick="return doclink('link-180', 'getInputs', 'link-17');">getInputs</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">outputs</tt><tt class="py-op">=</tt><tt class="py-name">case</tt><tt class="py-op">.</tt><tt id="link-181" class="py-name"><a title="spade.DF.Service.getOutputs
spade.tbcbp.Case.getOutputs
spade.tbcbp.Plan.getOutputs" class="py-name" href="#" onclick="return doclink('link-181', 'getOutputs', 'link-18');">getOutputs</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L327"></a><tt class="py-lineno">327</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L328"></a><tt class="py-lineno">328</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L329"></a><tt class="py-lineno">329</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">r</tt> <tt class="py-keyword">in</tt> <tt class="py-name">res</tt><tt class="py-op">:</tt> </tt>
<a name="L330"></a><tt class="py-lineno">330</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">r</tt><tt class="py-op">.</tt><tt id="link-182" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-182', 'services', 'link-43');">services</a></tt> <tt class="py-op">==</tt> <tt class="py-name">case</tt><tt class="py-op">.</tt><tt id="link-183" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-183', 'services', 'link-43');">services</a></tt><tt class="py-op">:</tt> </tt>
<a name="L331"></a><tt class="py-lineno">331</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">r</tt> </tt>
<a name="L332"></a><tt class="py-lineno">332</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L333"></a><tt class="py-lineno">333</tt>  <tt class="py-line">         </tt>
<a name="TBCBP.getCaseOfService"></a><div id="TBCBP.getCaseOfService-def"><a name="L334"></a><tt class="py-lineno">334</tt> <a class="py-toggle" href="#" id="TBCBP.getCaseOfService-toggle" onclick="return toggle('TBCBP.getCaseOfService');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.TBCBP-class.html#getCaseOfService">getCaseOfService</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TBCBP.getCaseOfService-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TBCBP.getCaseOfService-expanded"><a name="L335"></a><tt class="py-lineno">335</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L336"></a><tt class="py-lineno">336</tt>  <tt class="py-line"><tt class="py-docstring">        returns the case that represents the service 'name' in the case-base</tt> </tt>
<a name="L337"></a><tt class="py-lineno">337</tt>  <tt class="py-line"><tt class="py-docstring">        Usage:</tt> </tt>
<a name="L338"></a><tt class="py-lineno">338</tt>  <tt class="py-line"><tt class="py-docstring">        name - string with the name of the service</tt> </tt>
<a name="L339"></a><tt class="py-lineno">339</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L340"></a><tt class="py-lineno">340</tt>  <tt class="py-line">        <tt class="py-name">service</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-184" class="py-name" targets="Method spade.tbcbp.TBCBP.getService()=spade.tbcbp.TBCBP-class.html#getService"><a title="spade.tbcbp.TBCBP.getService" class="py-name" href="#" onclick="return doclink('link-184', 'getService', 'link-184');">getService</a></tt><tt class="py-op">(</tt><tt id="link-185" class="py-name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.pubsub.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.modules.config.name
spade.xmppd.modules.db_fake.name
spade.xmppd.modules.dialback.name
spade.xmppd.modules.jep0077.name
spade.xmppd.modules.jep0078.name
spade.xmppd.modules.message.name
spade.xmppd.modules.muc.name
spade.xmppd.modules.oob.name
spade.xmppd.modules.pubsub.name
spade.xmppd.modules.roster.name
spade.xmppd.modules.router.name
spade.xmppd.modules.stream.name
spade.xmppd.modules.webadmin.name
spade.xmppd.modules.wq.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-185', 'name', 'link-129');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L341"></a><tt class="py-lineno">341</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">service</tt><tt class="py-op">==</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L342"></a><tt class="py-lineno">342</tt>  <tt class="py-line">        <tt class="py-name">case</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-186" class="py-name"><a title="spade.tbcbp.Plan.getCase
spade.tbcbp.TBCBP.getCase" class="py-name" href="#" onclick="return doclink('link-186', 'getCase', 'link-168');">getCase</a></tt><tt class="py-op">(</tt><tt id="link-187" class="py-name"><a title="spade.tbcbp.Case" class="py-name" href="#" onclick="return doclink('link-187', 'Case', 'link-53');">Case</a></tt><tt class="py-op">(</tt><tt id="link-188" class="py-name"><a title="spade.Agent.P
spade.bdi.P
spade.logic.P" class="py-name" href="#" onclick="return doclink('link-188', 'P', 'link-13');">P</a></tt><tt class="py-op">=</tt><tt class="py-name">service</tt><tt class="py-op">.</tt><tt id="link-189" class="py-name"><a title="spade.DF.Service.getP
spade.tbcbp.Case.getP
spade.tbcbp.Plan.getP" class="py-name" href="#" onclick="return doclink('link-189', 'getP', 'link-14');">getP</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt id="link-190" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-190', 'Q', 'link-15');">Q</a></tt><tt class="py-op">=</tt><tt class="py-name">service</tt><tt class="py-op">.</tt><tt id="link-191" class="py-name"><a title="spade.DF.Service.getQ
spade.tbcbp.Case.getQ
spade.tbcbp.Plan.getQ" class="py-name" href="#" onclick="return doclink('link-191', 'getQ', 'link-16');">getQ</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">inputs</tt><tt class="py-op">=</tt><tt class="py-name">service</tt><tt class="py-op">.</tt><tt id="link-192" class="py-name"><a title="spade.DF.Service.getInputs
spade.tbcbp.Case.getInputs
spade.tbcbp.Plan.getInputs" class="py-name" href="#" onclick="return doclink('link-192', 'getInputs', 'link-17');">getInputs</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">outputs</tt><tt class="py-op">=</tt><tt class="py-name">service</tt><tt class="py-op">.</tt><tt id="link-193" class="py-name"><a title="spade.DF.Service.getOutputs
spade.tbcbp.Case.getOutputs
spade.tbcbp.Plan.getOutputs" class="py-name" href="#" onclick="return doclink('link-193', 'getOutputs', 'link-18');">getOutputs</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt id="link-194" class="py-name"><a title="spade.Platform.SpadePlatform.services" class="py-name" href="#" onclick="return doclink('link-194', 'services', 'link-43');">services</a></tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt id="link-195" class="py-name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.pubsub.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.modules.config.name
spade.xmppd.modules.db_fake.name
spade.xmppd.modules.dialback.name
spade.xmppd.modules.jep0077.name
spade.xmppd.modules.jep0078.name
spade.xmppd.modules.message.name
spade.xmppd.modules.muc.name
spade.xmppd.modules.oob.name
spade.xmppd.modules.pubsub.name
spade.xmppd.modules.roster.name
spade.xmppd.modules.router.name
spade.xmppd.modules.stream.name
spade.xmppd.modules.webadmin.name
spade.xmppd.modules.wq.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-195', 'name', 'link-129');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L343"></a><tt class="py-lineno">343</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">case</tt> </tt>
</div><a name="L344"></a><tt class="py-lineno">344</tt>  <tt class="py-line"> </tt>
<a name="TBCBP.planMatchesInKB"></a><div id="TBCBP.planMatchesInKB-def"><a name="L345"></a><tt class="py-lineno">345</tt> <a class="py-toggle" href="#" id="TBCBP.planMatchesInKB-toggle" onclick="return toggle('TBCBP.planMatchesInKB');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.TBCBP-class.html#planMatchesInKB">planMatchesInKB</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">case</tt><tt class="py-op">,</tt> <tt class="py-param">kb</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TBCBP.planMatchesInKB-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TBCBP.planMatchesInKB-expanded"><a name="L346"></a><tt class="py-lineno">346</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L347"></a><tt class="py-lineno">347</tt>  <tt class="py-line"><tt class="py-docstring">        returns True if all the Preconditions and Inputs of the case are true in the knowledge-base</tt> </tt>
<a name="L348"></a><tt class="py-lineno">348</tt>  <tt class="py-line"><tt class="py-docstring">        otherwise returns False</tt> </tt>
<a name="L349"></a><tt class="py-lineno">349</tt>  <tt class="py-line"><tt class="py-docstring">        Usage:</tt> </tt>
<a name="L350"></a><tt class="py-lineno">350</tt>  <tt class="py-line"><tt class="py-docstring">        case - the case that we want to compare. instance of Case</tt> </tt>
<a name="L351"></a><tt class="py-lineno">351</tt>  <tt class="py-line"><tt class="py-docstring">        kb   - the knowledge base of the agent. instance of kb.KB</tt> </tt>
<a name="L352"></a><tt class="py-lineno">352</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L353"></a><tt class="py-lineno">353</tt>  <tt class="py-line">        <tt class="py-name">Preconditions_matched</tt><tt class="py-op">=</tt><tt class="py-name">True</tt> </tt>
<a name="L354"></a><tt class="py-lineno">354</tt>  <tt class="py-line">        <tt class="py-name">Inputs_matched</tt><tt class="py-op">=</tt><tt class="py-name">True</tt> </tt>
<a name="L355"></a><tt class="py-lineno">355</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">p</tt> <tt class="py-keyword">in</tt> <tt class="py-name">case</tt><tt class="py-op">.</tt><tt id="link-196" class="py-name"><a title="spade.DF.Service.getP
spade.tbcbp.Case.getP
spade.tbcbp.Plan.getP" class="py-name" href="#" onclick="return doclink('link-196', 'getP', 'link-14');">getP</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L356"></a><tt class="py-lineno">356</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-197" class="py-name" targets="Module spade.kb=spade.kb-module.html"><a title="spade.kb" class="py-name" href="#" onclick="return doclink('link-197', 'kb', 'link-197');">kb</a></tt><tt class="py-op">.</tt><tt id="link-198" class="py-name" targets="Method spade.ECLiPSeKB.ECLiPSeKB.ask()=spade.ECLiPSeKB.ECLiPSeKB-class.html#ask,Method spade.Flora2KB.Flora2KB.ask()=spade.Flora2KB.Flora2KB-class.html#ask,Method spade.SPARQLKB.SPARQLKB.ask()=spade.SPARQLKB.SPARQLKB-class.html#ask,Method spade.SWIKB.SWIKB.ask()=spade.SWIKB.SWIKB-class.html#ask,Method spade.XSBKB.XSBKB.ask()=spade.XSBKB.XSBKB-class.html#ask,Method spade.kb.KB.ask()=spade.kb.KB-class.html#ask,Method spade.kb.SpadeKB.ask()=spade.kb.SpadeKB-class.html#ask,Method spade.logic.KB.ask()=spade.logic.KB-class.html#ask"><a title="spade.ECLiPSeKB.ECLiPSeKB.ask
spade.Flora2KB.Flora2KB.ask
spade.SPARQLKB.SPARQLKB.ask
spade.SWIKB.SWIKB.ask
spade.XSBKB.XSBKB.ask
spade.kb.KB.ask
spade.kb.SpadeKB.ask
spade.logic.KB.ask" class="py-name" href="#" onclick="return doclink('link-198', 'ask', 'link-198');">ask</a></tt><tt class="py-op">(</tt><tt class="py-name">p</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">False</tt><tt class="py-op">:</tt> </tt>
<a name="L357"></a><tt class="py-lineno">357</tt>  <tt class="py-line">                <tt class="py-name">Preconditions_matched</tt><tt class="py-op">=</tt><tt class="py-name">False</tt> </tt>
<a name="L358"></a><tt class="py-lineno">358</tt>  <tt class="py-line">                <tt class="py-keyword">break</tt> <tt class="py-comment">#preconditions do not match</tt> </tt>
<a name="L359"></a><tt class="py-lineno">359</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">case</tt><tt class="py-op">.</tt><tt id="link-199" class="py-name"><a title="spade.DF.Service.getInputs
spade.tbcbp.Case.getInputs
spade.tbcbp.Plan.getInputs" class="py-name" href="#" onclick="return doclink('link-199', 'getInputs', 'link-17');">getInputs</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L360"></a><tt class="py-lineno">360</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-200" class="py-name"><a title="spade.kb" class="py-name" href="#" onclick="return doclink('link-200', 'kb', 'link-197');">kb</a></tt><tt class="py-op">.</tt><tt id="link-201" class="py-name"><a title="spade.FlexQueue.FlexQueue.get
spade.kb.KB.get
spade.tbcbp.CaseDB.get
spade.xmppd.modules.db_fake.DB.get" class="py-name" href="#" onclick="return doclink('link-201', 'get', 'link-171');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">i</tt><tt class="py-op">)</tt><tt class="py-op">==</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L361"></a><tt class="py-lineno">361</tt>  <tt class="py-line">                <tt class="py-name">Inputs_matched</tt><tt class="py-op">=</tt><tt class="py-name">False</tt> </tt>
<a name="L362"></a><tt class="py-lineno">362</tt>  <tt class="py-line">                <tt class="py-keyword">break</tt> <tt class="py-comment">#inputs do not match</tt> </tt>
<a name="L363"></a><tt class="py-lineno">363</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">Preconditions_matched</tt> <tt class="py-keyword">and</tt> <tt class="py-name">Inputs_matched</tt><tt class="py-op">:</tt> </tt>
<a name="L364"></a><tt class="py-lineno">364</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L365"></a><tt class="py-lineno">365</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L366"></a><tt class="py-lineno">366</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L367"></a><tt class="py-lineno">367</tt>  <tt class="py-line"> </tt>
<a name="TBCBP.composePlan"></a><div id="TBCBP.composePlan-def"><a name="L368"></a><tt class="py-lineno">368</tt> <a class="py-toggle" href="#" id="TBCBP.composePlan-toggle" onclick="return toggle('TBCBP.composePlan');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.TBCBP-class.html#composePlan">composePlan</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">Goal</tt><tt class="py-op">,</tt> <tt class="py-param">kb</tt><tt class="py-op">,</tt> <tt class="py-param">tout</tt><tt class="py-op">=</tt><tt class="py-number">20</tt><tt class="py-op">,</tt> <tt class="py-param">use_rl</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TBCBP.composePlan-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TBCBP.composePlan-expanded"><a name="L369"></a><tt class="py-lineno">369</tt>  <tt class="py-line">         </tt>
<a name="L370"></a><tt class="py-lineno">370</tt>  <tt class="py-line">        <tt class="py-comment">#print "TBCBP::DB:: "+str(self.db)</tt> </tt>
<a name="L371"></a><tt class="py-lineno">371</tt>  <tt class="py-line">        <tt class="py-comment">#print "TBCBP::SERVICES:: "+str(self.services)</tt> </tt>
<a name="L372"></a><tt class="py-lineno">372</tt>  <tt class="py-line">        <tt class="py-comment">#print "TBCBP::composePlan::GOAL::"+str(Goal)+"::KB::"+str(kb.kb.clauses)+"::TOUT::"+str(tout)</tt> </tt>
<a name="L373"></a><tt class="py-lineno">373</tt>  <tt class="py-line">         </tt>
<a name="L374"></a><tt class="py-lineno">374</tt>  <tt class="py-line">        <tt class="py-name">MAXPLANS</tt><tt class="py-op">=</tt><tt class="py-number">1000</tt> </tt>
<a name="L375"></a><tt class="py-lineno">375</tt>  <tt class="py-line"> </tt>
<a name="L376"></a><tt class="py-lineno">376</tt>  <tt class="py-line">        <tt class="py-name">results</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L377"></a><tt class="py-lineno">377</tt>  <tt class="py-line">        <tt class="py-name">plans</tt> <tt class="py-op">=</tt> <tt class="py-name">Queue</tt><tt class="py-op">.</tt><tt class="py-name">Queue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L378"></a><tt class="py-lineno">378</tt>  <tt class="py-line">         </tt>
<a name="L379"></a><tt class="py-lineno">379</tt>  <tt class="py-line">        <tt class="py-name">t1</tt> <tt class="py-op">=</tt> <tt class="py-name">time</tt><tt class="py-op">.</tt><tt class="py-name">time</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L380"></a><tt class="py-lineno">380</tt>  <tt class="py-line">         </tt>
<a name="L381"></a><tt class="py-lineno">381</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L382"></a><tt class="py-lineno">382</tt>  <tt class="py-line">          <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L383"></a><tt class="py-lineno">383</tt>  <tt class="py-line">            <tt class="py-comment">#print "TBCBP::composePlan::getCases for "+str(Goal.expression)+" -&gt; "+str(self.getCases(Q=[Goal.expression]))</tt> </tt>
<a name="L384"></a><tt class="py-lineno">384</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">case</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-202" class="py-name" targets="Method spade.tbcbp.Plan.getCases()=spade.tbcbp.Plan-class.html#getCases,Method spade.tbcbp.TBCBP.getCases()=spade.tbcbp.TBCBP-class.html#getCases"><a title="spade.tbcbp.Plan.getCases
spade.tbcbp.TBCBP.getCases" class="py-name" href="#" onclick="return doclink('link-202', 'getCases', 'link-202');">getCases</a></tt><tt class="py-op">(</tt><tt id="link-203" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-203', 'Q', 'link-15');">Q</a></tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt id="link-204" class="py-name" targets="Class spade.bdi.Goal=spade.bdi.Goal-class.html"><a title="spade.bdi.Goal" class="py-name" href="#" onclick="return doclink('link-204', 'Goal', 'link-204');">Goal</a></tt><tt class="py-op">.</tt><tt class="py-name">expression</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-comment">#.values():</tt> </tt>
<a name="L385"></a><tt class="py-lineno">385</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">tout</tt><tt class="py-op">!=</tt><tt class="py-op">-</tt><tt class="py-number">1</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-name">time</tt><tt class="py-op">.</tt><tt class="py-name">time</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">-</tt><tt class="py-name">t1</tt><tt class="py-op">)</tt><tt class="py-op">&gt;</tt><tt class="py-name">tout</tt><tt class="py-op">:</tt> <tt class="py-keyword">raise</tt> <tt id="link-205" class="py-name" targets="Class spade.tbcbp.TimeOut=spade.tbcbp.TimeOut-class.html"><a title="spade.tbcbp.TimeOut" class="py-name" href="#" onclick="return doclink('link-205', 'TimeOut', 'link-205');">TimeOut</a></tt> </tt>
<a name="L386"></a><tt class="py-lineno">386</tt>  <tt class="py-line">                <tt class="py-comment">#for case in cases:</tt> </tt>
<a name="L387"></a><tt class="py-lineno">387</tt>  <tt class="py-line">                <tt class="py-name">new_plan</tt> <tt class="py-op">=</tt> <tt id="link-206" class="py-name" targets="Class spade.tbcbp.Plan=spade.tbcbp.Plan-class.html"><a title="spade.tbcbp.Plan" class="py-name" href="#" onclick="return doclink('link-206', 'Plan', 'link-206');">Plan</a></tt><tt class="py-op">(</tt><tt class="py-name">cases</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-name">case</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L388"></a><tt class="py-lineno">388</tt>  <tt class="py-line">                <tt class="py-comment">#if Preconditions match and have all inputs, the plan is finished</tt> </tt>
<a name="L389"></a><tt class="py-lineno">389</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-207" class="py-name" targets="Method spade.tbcbp.TBCBP.planMatchesInKB()=spade.tbcbp.TBCBP-class.html#planMatchesInKB"><a title="spade.tbcbp.TBCBP.planMatchesInKB" class="py-name" href="#" onclick="return doclink('link-207', 'planMatchesInKB', 'link-207');">planMatchesInKB</a></tt><tt class="py-op">(</tt><tt class="py-name">case</tt><tt class="py-op">,</tt><tt id="link-208" class="py-name"><a title="spade.kb" class="py-name" href="#" onclick="return doclink('link-208', 'kb', 'link-197');">kb</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L390"></a><tt class="py-lineno">390</tt>  <tt class="py-line">                        <tt class="py-name">results</tt><tt class="py-op">.</tt><tt id="link-209" class="py-name"><a title="spade.pyparsing.ParseExpression.append" class="py-name" href="#" onclick="return doclink('link-209', 'append', 'link-37');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">new_plan</tt><tt class="py-op">)</tt> </tt>
<a name="L391"></a><tt class="py-lineno">391</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> <tt class="py-name">plans</tt><tt class="py-op">.</tt><tt id="link-210" class="py-name" targets="Method spade.FlexQueue.FlexQueue.put()=spade.FlexQueue.FlexQueue-class.html#put"><a title="spade.FlexQueue.FlexQueue.put" class="py-name" href="#" onclick="return doclink('link-210', 'put', 'link-210');">put</a></tt><tt class="py-op">(</tt><tt class="py-name">new_plan</tt><tt class="py-op">)</tt> </tt>
<a name="L392"></a><tt class="py-lineno">392</tt>  <tt class="py-line">             </tt>
<a name="L393"></a><tt class="py-lineno">393</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">tout</tt><tt class="py-op">!=</tt><tt class="py-op">-</tt><tt class="py-number">1</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-name">time</tt><tt class="py-op">.</tt><tt class="py-name">time</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">-</tt><tt class="py-name">t1</tt><tt class="py-op">)</tt><tt class="py-op">&gt;</tt><tt class="py-name">tout</tt><tt class="py-op">:</tt> <tt class="py-keyword">raise</tt> <tt id="link-211" class="py-name"><a title="spade.tbcbp.TimeOut" class="py-name" href="#" onclick="return doclink('link-211', 'TimeOut', 'link-205');">TimeOut</a></tt> </tt>
<a name="L394"></a><tt class="py-lineno">394</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">results</tt><tt class="py-op">)</tt><tt class="py-op">&gt;</tt><tt class="py-name">MAXPLANS</tt><tt class="py-op">:</tt> <tt class="py-keyword">raise</tt> <tt id="link-212" class="py-name" targets="Class spade.tbcbp.TooMuchPlans=spade.tbcbp.TooMuchPlans-class.html"><a title="spade.tbcbp.TooMuchPlans" class="py-name" href="#" onclick="return doclink('link-212', 'TooMuchPlans', 'link-212');">TooMuchPlans</a></tt> </tt>
<a name="L395"></a><tt class="py-lineno">395</tt>  <tt class="py-line">     </tt>
<a name="L396"></a><tt class="py-lineno">396</tt>  <tt class="py-line">            <tt class="py-keyword">while</tt> <tt class="py-name">plans</tt><tt class="py-op">.</tt><tt id="link-213" class="py-name" targets="Method spade.FlexQueue.FlexQueue.qsize()=spade.FlexQueue.FlexQueue-class.html#qsize"><a title="spade.FlexQueue.FlexQueue.qsize" class="py-name" href="#" onclick="return doclink('link-213', 'qsize', 'link-213');">qsize</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L397"></a><tt class="py-lineno">397</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">results</tt><tt class="py-op">)</tt><tt class="py-op">&gt;</tt><tt class="py-name">MAXPLANS</tt><tt class="py-op">:</tt> <tt class="py-keyword">raise</tt> <tt id="link-214" class="py-name"><a title="spade.tbcbp.TooMuchPlans" class="py-name" href="#" onclick="return doclink('link-214', 'TooMuchPlans', 'link-212');">TooMuchPlans</a></tt> </tt>
<a name="L398"></a><tt class="py-lineno">398</tt>  <tt class="py-line">                <tt class="py-name">p</tt> <tt class="py-op">=</tt> <tt class="py-name">plans</tt><tt class="py-op">.</tt><tt id="link-215" class="py-name"><a title="spade.FlexQueue.FlexQueue.get
spade.kb.KB.get
spade.tbcbp.CaseDB.get
spade.xmppd.modules.db_fake.DB.get" class="py-name" href="#" onclick="return doclink('link-215', 'get', 'link-171');">get</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L399"></a><tt class="py-lineno">399</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">case</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-216" class="py-name"><a title="spade.tbcbp.Plan.getCases
spade.tbcbp.TBCBP.getCases" class="py-name" href="#" onclick="return doclink('link-216', 'getCases', 'link-202');">getCases</a></tt><tt class="py-op">(</tt><tt class="py-name">outputs</tt><tt class="py-op">=</tt><tt class="py-name">p</tt><tt class="py-op">.</tt><tt id="link-217" class="py-name"><a title="spade.DF.Service.getInputs
spade.tbcbp.Case.getInputs
spade.tbcbp.Plan.getInputs" class="py-name" href="#" onclick="return doclink('link-217', 'getInputs', 'link-17');">getInputs</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt>  <tt class="py-comment">#.values():</tt> </tt>
<a name="L400"></a><tt class="py-lineno">400</tt>  <tt class="py-line">                    <tt class="py-comment">#for case in cases:</tt> </tt>
<a name="L401"></a><tt class="py-lineno">401</tt>  <tt class="py-line">                    <tt class="py-name">new_plan</tt> <tt class="py-op">=</tt> <tt class="py-name">deepcopy</tt><tt class="py-op">(</tt><tt class="py-name">p</tt><tt class="py-op">)</tt> </tt>
<a name="L402"></a><tt class="py-lineno">402</tt>  <tt class="py-line">                    <tt class="py-name">new_plan</tt><tt class="py-op">.</tt><tt id="link-218" class="py-name" targets="Method spade.tbcbp.Plan.insertCase()=spade.tbcbp.Plan-class.html#insertCase"><a title="spade.tbcbp.Plan.insertCase" class="py-name" href="#" onclick="return doclink('link-218', 'insertCase', 'link-218');">insertCase</a></tt><tt class="py-op">(</tt><tt class="py-name">case</tt><tt class="py-op">)</tt> </tt>
<a name="L403"></a><tt class="py-lineno">403</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-219" class="py-name"><a title="spade.tbcbp.TBCBP.planMatchesInKB" class="py-name" href="#" onclick="return doclink('link-219', 'planMatchesInKB', 'link-207');">planMatchesInKB</a></tt><tt class="py-op">(</tt><tt class="py-name">new_plan</tt><tt class="py-op">,</tt><tt id="link-220" class="py-name"><a title="spade.kb" class="py-name" href="#" onclick="return doclink('link-220', 'kb', 'link-197');">kb</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L404"></a><tt class="py-lineno">404</tt>  <tt class="py-line">                        <tt class="py-comment">#if new_plan not in results:</tt> </tt>
<a name="L405"></a><tt class="py-lineno">405</tt>  <tt class="py-line">                        <tt class="py-name">results</tt><tt class="py-op">.</tt><tt id="link-221" class="py-name"><a title="spade.pyparsing.ParseExpression.append" class="py-name" href="#" onclick="return doclink('link-221', 'append', 'link-37');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">new_plan</tt><tt class="py-op">)</tt> </tt>
<a name="L406"></a><tt class="py-lineno">406</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L407"></a><tt class="py-lineno">407</tt>  <tt class="py-line">                        <tt class="py-name">plans</tt><tt class="py-op">.</tt><tt id="link-222" class="py-name"><a title="spade.FlexQueue.FlexQueue.put" class="py-name" href="#" onclick="return doclink('link-222', 'put', 'link-210');">put</a></tt><tt class="py-op">(</tt><tt class="py-name">new_plan</tt><tt class="py-op">)</tt> </tt>
<a name="L408"></a><tt class="py-lineno">408</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">tout</tt><tt class="py-op">!=</tt><tt class="py-op">-</tt><tt class="py-number">1</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-name">time</tt><tt class="py-op">.</tt><tt class="py-name">time</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">-</tt><tt class="py-name">t1</tt><tt class="py-op">)</tt><tt class="py-op">&gt;</tt><tt class="py-name">tout</tt><tt class="py-op">:</tt> <tt class="py-keyword">raise</tt> <tt id="link-223" class="py-name"><a title="spade.tbcbp.TimeOut" class="py-name" href="#" onclick="return doclink('link-223', 'TimeOut', 'link-205');">TimeOut</a></tt> </tt>
<a name="L409"></a><tt class="py-lineno">409</tt>  <tt class="py-line">             </tt>
<a name="L410"></a><tt class="py-lineno">410</tt>  <tt class="py-line">          <tt class="py-keyword">except</tt> <tt id="link-224" class="py-name"><a title="spade.tbcbp.TimeOut" class="py-name" href="#" onclick="return doclink('link-224', 'TimeOut', 'link-205');">TimeOut</a></tt><tt class="py-op">:</tt> </tt>
<a name="L411"></a><tt class="py-lineno">411</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
<a name="L412"></a><tt class="py-lineno">412</tt>  <tt class="py-line">            <tt class="py-comment">#print "TIMEOUT!"</tt> </tt>
<a name="L413"></a><tt class="py-lineno">413</tt>  <tt class="py-line">          <tt class="py-keyword">except</tt> <tt id="link-225" class="py-name"><a title="spade.tbcbp.TooMuchPlans" class="py-name" href="#" onclick="return doclink('link-225', 'TooMuchPlans', 'link-212');">TooMuchPlans</a></tt><tt class="py-op">:</tt> </tt>
<a name="L414"></a><tt class="py-lineno">414</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
<a name="L415"></a><tt class="py-lineno">415</tt>  <tt class="py-line">            <tt class="py-comment">#print "TOOMUCHPLANS!"</tt> </tt>
<a name="L416"></a><tt class="py-lineno">416</tt>  <tt class="py-line">             </tt>
<a name="L417"></a><tt class="py-lineno">417</tt>  <tt class="py-line">        <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L418"></a><tt class="py-lineno">418</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
<a name="L419"></a><tt class="py-lineno">419</tt>  <tt class="py-line"> </tt>
<a name="L420"></a><tt class="py-lineno">420</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">results</tt> <tt class="py-op">==</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L421"></a><tt class="py-lineno">421</tt>  <tt class="py-line">            <tt class="py-comment">#print "NO PLANS FOUND!"</tt> </tt>
<a name="L422"></a><tt class="py-lineno">422</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L423"></a><tt class="py-lineno">423</tt>  <tt class="py-line">        <tt class="py-name">sumT</tt><tt class="py-op">=</tt><tt class="py-number">0</tt> </tt>
<a name="L424"></a><tt class="py-lineno">424</tt>  <tt class="py-line">        <tt class="py-name">sumQ</tt><tt class="py-op">=</tt><tt class="py-number">0</tt> </tt>
<a name="L425"></a><tt class="py-lineno">425</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">plan</tt> <tt class="py-keyword">in</tt> <tt class="py-name">results</tt><tt class="py-op">:</tt> </tt>
<a name="L426"></a><tt class="py-lineno">426</tt>  <tt class="py-line">            <tt class="py-name">sumT</tt><tt class="py-op">+=</tt><tt class="py-name">plan</tt><tt class="py-op">.</tt><tt id="link-226" class="py-name"><a title="spade.BasicFipaDateTime.BasicFipaDateTime.getTime
spade.tbcbp.Case.getTime
spade.tbcbp.Plan.getTime" class="py-name" href="#" onclick="return doclink('link-226', 'getTime', 'link-121');">getTime</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L427"></a><tt class="py-lineno">427</tt>  <tt class="py-line">            <tt class="py-name">sumQ</tt><tt class="py-op">+=</tt><tt class="py-name">plan</tt><tt class="py-op">.</tt><tt id="link-227" class="py-name"><a title="spade.tbcbp.Case.getQoS
spade.tbcbp.Plan.getQoS" class="py-name" href="#" onclick="return doclink('link-227', 'getQoS', 'link-122');">getQoS</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L428"></a><tt class="py-lineno">428</tt>  <tt class="py-line"> </tt>
<a name="L429"></a><tt class="py-lineno">429</tt>  <tt class="py-line">        <tt class="py-comment">#print "selecting best plan"</tt> </tt>
<a name="L430"></a><tt class="py-lineno">430</tt>  <tt class="py-line">        <tt class="py-name">plans</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L431"></a><tt class="py-lineno">431</tt>  <tt class="py-line">        <tt class="py-name">exploit</tt><tt class="py-op">=</tt> <tt id="link-228" class="py-name"><a title="spade.odict
spade.odict.odict" class="py-name" href="#" onclick="return doclink('link-228', 'odict', 'link-0');">odict</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L432"></a><tt class="py-lineno">432</tt>  <tt class="py-line">        <tt class="py-name">last</tt><tt class="py-op">=</tt><tt class="py-number">0</tt> </tt>
<a name="L433"></a><tt class="py-lineno">433</tt>  <tt class="py-line">        <tt class="py-name">normalize</tt><tt class="py-op">=</tt><tt class="py-number">10000</tt> </tt>
<a name="L434"></a><tt class="py-lineno">434</tt>  <tt class="py-line"> </tt>
<a name="L435"></a><tt class="py-lineno">435</tt>  <tt class="py-line">        <tt class="py-name">best_plan</tt> <tt class="py-op">=</tt> <tt class="py-name">results</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L436"></a><tt class="py-lineno">436</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">sumT</tt><tt class="py-op">==</tt><tt class="py-number">0</tt><tt class="py-op">:</tt> <tt id="link-229" class="py-name" targets="Class spade.xmpp.simplexml.T=spade.xmpp.simplexml.T-class.html"><a title="spade.xmpp.simplexml.T" class="py-name" href="#" onclick="return doclink('link-229', 'T', 'link-229');">T</a></tt><tt class="py-op">=</tt><tt class="py-number">0.0</tt> </tt>
<a name="L437"></a><tt class="py-lineno">437</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> <tt id="link-230" class="py-name"><a title="spade.xmpp.simplexml.T" class="py-name" href="#" onclick="return doclink('link-230', 'T', 'link-229');">T</a></tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-number">1.0</tt><tt class="py-op">/</tt><tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">best_plan</tt><tt class="py-op">.</tt><tt id="link-231" class="py-name"><a title="spade.BasicFipaDateTime.BasicFipaDateTime.getTime
spade.tbcbp.Case.getTime
spade.tbcbp.Plan.getTime" class="py-name" href="#" onclick="return doclink('link-231', 'getTime', 'link-121');">getTime</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">sumT</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L438"></a><tt class="py-lineno">438</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">sumQ</tt><tt class="py-op">==</tt><tt class="py-number">0</tt><tt class="py-op">:</tt> <tt id="link-232" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-232', 'Q', 'link-15');">Q</a></tt><tt class="py-op">=</tt><tt class="py-number">0.0</tt> </tt>
<a name="L439"></a><tt class="py-lineno">439</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> <tt id="link-233" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-233', 'Q', 'link-15');">Q</a></tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">best_plan</tt><tt class="py-op">.</tt><tt id="link-234" class="py-name"><a title="spade.tbcbp.Case.getQoS
spade.tbcbp.Plan.getQoS" class="py-name" href="#" onclick="return doclink('link-234', 'getQoS', 'link-122');">getQoS</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">sumQ</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L440"></a><tt class="py-lineno">440</tt>  <tt class="py-line">        <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt id="link-235" class="py-name"><a title="spade.xmpp.simplexml.T" class="py-name" href="#" onclick="return doclink('link-235', 'T', 'link-229');">T</a></tt><tt class="py-op">+</tt><tt id="link-236" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-236', 'Q', 'link-15');">Q</a></tt> </tt>
<a name="L441"></a><tt class="py-lineno">441</tt>  <tt class="py-line">        <tt class="py-name">plans</tt><tt class="py-op">.</tt><tt id="link-237" class="py-name"><a title="spade.pyparsing.ParseExpression.append" class="py-name" href="#" onclick="return doclink('link-237', 'append', 'link-37');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">best_plan</tt><tt class="py-op">)</tt> </tt>
<a name="L442"></a><tt class="py-lineno">442</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">*</tt><tt class="py-name">normalize</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L443"></a><tt class="py-lineno">443</tt>  <tt class="py-line">            <tt class="py-name">exploit</tt><tt class="py-op">[</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">*</tt><tt class="py-name">normalize</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">best_plan</tt> </tt>
<a name="L444"></a><tt class="py-lineno">444</tt>  <tt class="py-line">            <tt class="py-name">last</tt><tt class="py-op">=</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">*</tt><tt class="py-name">normalize</tt><tt class="py-op">)</tt> </tt>
<a name="L445"></a><tt class="py-lineno">445</tt>  <tt class="py-line">         </tt>
<a name="L446"></a><tt class="py-lineno">446</tt>  <tt class="py-line">          </tt>
<a name="L447"></a><tt class="py-lineno">447</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">plan</tt> <tt class="py-keyword">in</tt> <tt class="py-name">results</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L448"></a><tt class="py-lineno">448</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">sumT</tt><tt class="py-op">==</tt><tt class="py-number">0</tt><tt class="py-op">:</tt> <tt id="link-238" class="py-name"><a title="spade.xmpp.simplexml.T" class="py-name" href="#" onclick="return doclink('link-238', 'T', 'link-229');">T</a></tt><tt class="py-op">=</tt><tt class="py-number">0.0</tt> </tt>
<a name="L449"></a><tt class="py-lineno">449</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> <tt id="link-239" class="py-name"><a title="spade.xmpp.simplexml.T" class="py-name" href="#" onclick="return doclink('link-239', 'T', 'link-229');">T</a></tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-number">1.0</tt><tt class="py-op">/</tt><tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">plan</tt><tt class="py-op">.</tt><tt id="link-240" class="py-name"><a title="spade.BasicFipaDateTime.BasicFipaDateTime.getTime
spade.tbcbp.Case.getTime
spade.tbcbp.Plan.getTime" class="py-name" href="#" onclick="return doclink('link-240', 'getTime', 'link-121');">getTime</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">sumT</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L450"></a><tt class="py-lineno">450</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">sumQ</tt><tt class="py-op">==</tt><tt class="py-number">0</tt><tt class="py-op">:</tt> <tt id="link-241" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-241', 'Q', 'link-15');">Q</a></tt><tt class="py-op">=</tt><tt class="py-number">0.0</tt> </tt>
<a name="L451"></a><tt class="py-lineno">451</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> <tt id="link-242" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-242', 'Q', 'link-15');">Q</a></tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">plan</tt><tt class="py-op">.</tt><tt id="link-243" class="py-name"><a title="spade.tbcbp.Case.getQoS
spade.tbcbp.Plan.getQoS" class="py-name" href="#" onclick="return doclink('link-243', 'getQoS', 'link-122');">getQoS</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">sumQ</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L452"></a><tt class="py-lineno">452</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt id="link-244" class="py-name"><a title="spade.xmpp.simplexml.T" class="py-name" href="#" onclick="return doclink('link-244', 'T', 'link-229');">T</a></tt><tt class="py-op">+</tt><tt id="link-245" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-245', 'Q', 'link-15');">Q</a></tt> <tt class="py-op">&gt;</tt> <tt class="py-name">f</tt><tt class="py-op">:</tt> </tt>
<a name="L453"></a><tt class="py-lineno">453</tt>  <tt class="py-line">                    <tt class="py-name">best_plan</tt> <tt class="py-op">=</tt> <tt class="py-name">plan</tt> </tt>
<a name="L454"></a><tt class="py-lineno">454</tt>  <tt class="py-line">                    <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt id="link-246" class="py-name"><a title="spade.xmpp.simplexml.T" class="py-name" href="#" onclick="return doclink('link-246', 'T', 'link-229');">T</a></tt><tt class="py-op">+</tt><tt id="link-247" class="py-name"><a title="spade.Agent.Q
spade.bdi.Q
spade.logic.Q" class="py-name" href="#" onclick="return doclink('link-247', 'Q', 'link-15');">Q</a></tt> </tt>
<a name="L455"></a><tt class="py-lineno">455</tt>  <tt class="py-line">                <tt class="py-name">plans</tt><tt class="py-op">.</tt><tt id="link-248" class="py-name"><a title="spade.pyparsing.ParseExpression.append" class="py-name" href="#" onclick="return doclink('link-248', 'append', 'link-37');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">plan</tt><tt class="py-op">)</tt> </tt>
<a name="L456"></a><tt class="py-lineno">456</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">last</tt><tt class="py-op">+</tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">*</tt><tt class="py-name">normalize</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">&gt;</tt><tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L457"></a><tt class="py-lineno">457</tt>  <tt class="py-line">                    <tt class="py-name">exploit</tt><tt class="py-op">[</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">last</tt><tt class="py-op">+</tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">*</tt><tt class="py-name">normalize</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">plan</tt> </tt>
<a name="L458"></a><tt class="py-lineno">458</tt>  <tt class="py-line">                    <tt class="py-name">last</tt> <tt class="py-op">=</tt> <tt class="py-name">last</tt><tt class="py-op">+</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">*</tt><tt class="py-name">normalize</tt><tt class="py-op">)</tt> </tt>
<a name="L459"></a><tt class="py-lineno">459</tt>  <tt class="py-line"> </tt>
<a name="L460"></a><tt class="py-lineno">460</tt>  <tt class="py-line">        <tt class="py-comment">#mini reinforcement learning</tt> </tt>
<a name="L461"></a><tt class="py-lineno">461</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">use_rl</tt><tt class="py-op">:</tt> </tt>
<a name="L462"></a><tt class="py-lineno">462</tt>  <tt class="py-line">            <tt class="py-name">explore</tt> <tt class="py-op">=</tt> <tt class="py-name">random</tt><tt class="py-op">.</tt><tt class="py-name">random</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L463"></a><tt class="py-lineno">463</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">explore</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">threshold</tt><tt class="py-op">:</tt> </tt>
<a name="L464"></a><tt class="py-lineno">464</tt>  <tt class="py-line">                <tt class="py-comment">#explore!</tt> </tt>
<a name="L465"></a><tt class="py-lineno">465</tt>  <tt class="py-line">                <tt class="py-name">best_plan</tt> <tt class="py-op">=</tt> <tt class="py-name">random</tt><tt class="py-op">.</tt><tt class="py-name">choice</tt><tt class="py-op">(</tt><tt class="py-name">plans</tt><tt class="py-op">)</tt> </tt>
<a name="L466"></a><tt class="py-lineno">466</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L467"></a><tt class="py-lineno">467</tt>  <tt class="py-line">                <tt class="py-comment">#exploit!</tt> </tt>
<a name="L468"></a><tt class="py-lineno">468</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">last</tt><tt class="py-op">==</tt><tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L469"></a><tt class="py-lineno">469</tt>  <tt class="py-line">                    <tt class="py-name">best_plan</tt><tt class="py-op">=</tt> <tt class="py-name">random</tt><tt class="py-op">.</tt><tt class="py-name">choice</tt><tt class="py-op">(</tt><tt class="py-name">plans</tt><tt class="py-op">)</tt> </tt>
<a name="L470"></a><tt class="py-lineno">470</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L471"></a><tt class="py-lineno">471</tt>  <tt class="py-line">                    <tt class="py-name">i</tt> <tt class="py-op">=</tt> <tt class="py-name">random</tt><tt class="py-op">.</tt><tt class="py-name">randint</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">,</tt><tt class="py-name">last</tt><tt class="py-op">)</tt> </tt>
<a name="L472"></a><tt class="py-lineno">472</tt>  <tt class="py-line">                    <tt class="py-keyword">for</tt> <tt class="py-name">k</tt> <tt class="py-keyword">in</tt> <tt class="py-name">exploit</tt><tt class="py-op">.</tt><tt id="link-249" class="py-name"><a title="spade.dblite.Index.keys
spade.odict.odict.keys
spade.pyparsing.ParseResults.keys
spade.xmpp.roster.Roster.keys" class="py-name" href="#" onclick="return doclink('link-249', 'keys', 'link-164');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L473"></a><tt class="py-lineno">473</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">i</tt><tt class="py-op">&lt;=</tt><tt class="py-name">k</tt><tt class="py-op">:</tt> </tt>
<a name="L474"></a><tt class="py-lineno">474</tt>  <tt class="py-line">                            <tt class="py-name">best_plan</tt><tt class="py-op">=</tt><tt class="py-name">exploit</tt><tt class="py-op">[</tt><tt class="py-name">k</tt><tt class="py-op">]</tt> </tt>
<a name="L475"></a><tt class="py-lineno">475</tt>  <tt class="py-line">                            <tt class="py-keyword">break</tt> </tt>
<a name="L476"></a><tt class="py-lineno">476</tt>  <tt class="py-line">                 </tt>
<a name="L477"></a><tt class="py-lineno">477</tt>  <tt class="py-line">             </tt>
<a name="L478"></a><tt class="py-lineno">478</tt>  <tt class="py-line">        <tt class="py-comment">#adjust threshold</tt> </tt>
<a name="L479"></a><tt class="py-lineno">479</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">steps</tt><tt class="py-op">+=</tt><tt class="py-number">1</tt> </tt>
<a name="L480"></a><tt class="py-lineno">480</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">steps</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">limit_steps</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">threshold</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">max_threshold</tt> </tt>
<a name="L481"></a><tt class="py-lineno">481</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">threshold</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">max_threshold</tt> <tt class="py-op">*</tt> <tt class="py-name">log</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">steps</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-op">/</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">RLlimit</tt> </tt>
<a name="L482"></a><tt class="py-lineno">482</tt>  <tt class="py-line">             </tt>
<a name="L483"></a><tt class="py-lineno">483</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-250" class="py-name" targets="Method spade.Agent.BDIAgent.addPlan()=spade.Agent.BDIAgent-class.html#addPlan,Method spade.bdi.BDIBehaviour.addPlan()=spade.bdi.BDIBehaviour-class.html#addPlan,Method spade.tbcbp.TBCBP.addPlan()=spade.tbcbp.TBCBP-class.html#addPlan"><a title="spade.Agent.BDIAgent.addPlan
spade.bdi.BDIBehaviour.addPlan
spade.tbcbp.TBCBP.addPlan" class="py-name" href="#" onclick="return doclink('link-250', 'addPlan', 'link-250');">addPlan</a></tt><tt class="py-op">(</tt><tt class="py-name">best_plan</tt><tt class="py-op">)</tt> </tt>
<a name="L484"></a><tt class="py-lineno">484</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">best_plan</tt> </tt>
</div><a name="L485"></a><tt class="py-lineno">485</tt>  <tt class="py-line"> </tt>
<a name="L486"></a><tt class="py-lineno">486</tt>  <tt class="py-line">             </tt>
<a name="L487"></a><tt class="py-lineno">487</tt>  <tt class="py-line"> </tt>
<a name="TBCBP.retain"></a><div id="TBCBP.retain-def"><a name="L488"></a><tt class="py-lineno">488</tt> <a class="py-toggle" href="#" id="TBCBP.retain-toggle" onclick="return toggle('TBCBP.retain');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.TBCBP-class.html#retain">retain</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">case</tt><tt class="py-op">,</tt> <tt class="py-param">QoS</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TBCBP.retain-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TBCBP.retain-expanded"><a name="L489"></a><tt class="py-lineno">489</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">QoS</tt><tt class="py-op">!=</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> <tt class="py-name">case</tt><tt class="py-op">.</tt><tt class="py-name">QoS</tt><tt class="py-op">=</tt><tt class="py-name">QoS</tt> </tt>
<a name="L490"></a><tt class="py-lineno">490</tt>  <tt class="py-line"> </tt>
<a name="L491"></a><tt class="py-lineno">491</tt>  <tt class="py-line">        <tt id="link-251" class="py-name"><a title="spade.ACLParser.c
spade.AMS.c
spade.DF.c
spade.SL0Parser.c
spade.pyparsing.c" class="py-name" href="#" onclick="return doclink('link-251', 'c', 'link-102');">c</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-252" class="py-name"><a title="spade.tbcbp.Plan.getCase
spade.tbcbp.TBCBP.getCase" class="py-name" href="#" onclick="return doclink('link-252', 'getCase', 'link-168');">getCase</a></tt><tt class="py-op">(</tt><tt class="py-name">case</tt><tt class="py-op">)</tt> </tt>
<a name="L492"></a><tt class="py-lineno">492</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-253" class="py-name"><a title="spade.ACLParser.c
spade.AMS.c
spade.DF.c
spade.SL0Parser.c
spade.pyparsing.c" class="py-name" href="#" onclick="return doclink('link-253', 'c', 'link-102');">c</a></tt><tt class="py-op">:</tt> </tt>
<a name="L493"></a><tt class="py-lineno">493</tt>  <tt class="py-line">            <tt id="link-254" class="py-name"><a title="spade.ACLParser.c
spade.AMS.c
spade.DF.c
spade.SL0Parser.c
spade.pyparsing.c" class="py-name" href="#" onclick="return doclink('link-254', 'c', 'link-102');">c</a></tt><tt class="py-op">.</tt><tt class="py-name">QoS</tt><tt class="py-op">=</tt><tt class="py-name">case</tt><tt class="py-op">.</tt><tt class="py-name">QoS</tt> </tt>
</div><a name="L494"></a><tt class="py-lineno">494</tt>  <tt class="py-line">         </tt>
<a name="L495"></a><tt class="py-lineno">495</tt>  <tt class="py-line">         </tt>
<a name="TBCBP.reward"></a><div id="TBCBP.reward-def"><a name="L496"></a><tt class="py-lineno">496</tt> <a class="py-toggle" href="#" id="TBCBP.reward-toggle" onclick="return toggle('TBCBP.reward');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.TBCBP-class.html#reward">reward</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">c</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TBCBP.reward-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TBCBP.reward-expanded"><a name="L497"></a><tt class="py-lineno">497</tt>  <tt class="py-line">        <tt class="py-name">case</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-255" class="py-name"><a title="spade.tbcbp.Plan.getCase
spade.tbcbp.TBCBP.getCase" class="py-name" href="#" onclick="return doclink('link-255', 'getCase', 'link-168');">getCase</a></tt><tt class="py-op">(</tt><tt id="link-256" class="py-name"><a title="spade.ACLParser.c
spade.AMS.c
spade.DF.c
spade.SL0Parser.c
spade.pyparsing.c" class="py-name" href="#" onclick="return doclink('link-256', 'c', 'link-102');">c</a></tt><tt class="py-op">)</tt> </tt>
<a name="L498"></a><tt class="py-lineno">498</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">case</tt><tt class="py-op">!=</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L499"></a><tt class="py-lineno">499</tt>  <tt class="py-line">            <tt class="py-name">case</tt><tt class="py-op">.</tt><tt id="link-257" class="py-name" targets="Method spade.tbcbp.Case.reward()=spade.tbcbp.Case-class.html#reward,Method spade.tbcbp.TBCBP.reward()=spade.tbcbp.TBCBP-class.html#reward"><a title="spade.tbcbp.Case.reward
spade.tbcbp.TBCBP.reward" class="py-name" href="#" onclick="return doclink('link-257', 'reward', 'link-257');">reward</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L500"></a><tt class="py-lineno">500</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">case</tt> </tt>
<a name="L501"></a><tt class="py-lineno">501</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L502"></a><tt class="py-lineno">502</tt>  <tt class="py-line">         </tt>
<a name="TBCBP.punish"></a><div id="TBCBP.punish-def"><a name="L503"></a><tt class="py-lineno">503</tt> <a class="py-toggle" href="#" id="TBCBP.punish-toggle" onclick="return toggle('TBCBP.punish');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.tbcbp.TBCBP-class.html#punish">punish</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">c</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TBCBP.punish-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TBCBP.punish-expanded"><a name="L504"></a><tt class="py-lineno">504</tt>  <tt class="py-line">        <tt class="py-name">case</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-258" class="py-name"><a title="spade.tbcbp.Plan.getCase
spade.tbcbp.TBCBP.getCase" class="py-name" href="#" onclick="return doclink('link-258', 'getCase', 'link-168');">getCase</a></tt><tt class="py-op">(</tt><tt id="link-259" class="py-name"><a title="spade.ACLParser.c
spade.AMS.c
spade.DF.c
spade.SL0Parser.c
spade.pyparsing.c" class="py-name" href="#" onclick="return doclink('link-259', 'c', 'link-102');">c</a></tt><tt class="py-op">)</tt> </tt>
<a name="L505"></a><tt class="py-lineno">505</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">case</tt><tt class="py-op">!=</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L506"></a><tt class="py-lineno">506</tt>  <tt class="py-line">            <tt class="py-name">case</tt><tt class="py-op">.</tt><tt id="link-260" class="py-name" targets="Method spade.tbcbp.Case.punish()=spade.tbcbp.Case-class.html#punish,Method spade.tbcbp.TBCBP.punish()=spade.tbcbp.TBCBP-class.html#punish"><a title="spade.tbcbp.Case.punish
spade.tbcbp.TBCBP.punish" class="py-name" href="#" onclick="return doclink('link-260', 'punish', 'link-260');">punish</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L507"></a><tt class="py-lineno">507</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">case</tt> </tt>
<a name="L508"></a><tt class="py-lineno">508</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div></div><a name="L509"></a><tt class="py-lineno">509</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="spade-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://spade2.googlecode.com">SPADE</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Wed Aug  1 18:45:05 2012
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
